from typing import Dict
from typing import List
from typing import Set
import functools
import operator


def reshape_meta(o: Dict[int | str, int]) -> List[Set[int]]:
    """Convert the CSV data to sets

    Parameters:

    - `o`: `Dict[int | str, int]`, data to be converted

    Returns: `List[Set[int]]`

    - The first set contains ID of all issues;
    - The second set contains ID of closed issues;
    - The third set contains ID of open issues;
    - The fourth set contains ID of pending issues;
    - The fifth set contains ID of languishing issues.
    """
    ret: List[Set[int]] = [set() for _ in range(5)]
    for i in o:
        ret[o[i]].add(int(i))
    ret[0] = functools.reduce(operator.or_, ret[1:])
    return ret