def METHOD_NAME(df: pd.DataFrame, xcat: str, cids: List[str] = None,
                   start: str = None, end: str = None,
                   nan_black: bool = False):
    """
    Converts binary category of standardized dataframe into a standardized dictionary
    that can serve as a blacklist for cross-sections in further analyses
    :param <pd.Dataframe> df: standardized DataFrame with following columns:
        'cid', 'xcat', 'real_date' and 'value'.
    :param <str> xcat: category with binary values, where 1 means blacklisting and 0
        means not blacklisting.
    :param List<str> cids: list of cross-sections that are considered in the formation
        of the blacklist. Per default, all available cross sections are considered.
    :param <str> start: earliest date in ISO format. Default is None and earliest date
        for which the respective category is available is used.
    :param <str> end: latest date in ISO format. Default is None and latest date
        for which the respective category is available is used.
    :param <bool> nan_black: if True NaNs are blacklisted (coverted to ones). Defaults is
        False, i.e. NaNs are converted to zeroes.
    :return <dict>: standardized dictionary with cross-sections as keys and tuples of
        start and end dates of the blacklist periods in ISO formats as values.
        If one cross section has multiple blacklist periods, numbers are added to the
        keys (i.e. TRY_1, TRY_2, etc.)
    """
    df["real_date"] = pd.to_datetime(df["real_date"], format="%Y-%m-%d")
    dfd = reduce_df(df=df, xcats=[xcat], cids=cids, start=start, end=end)
    assert all(np.isin(dfd.value.dropna().unique(), [0, 1])), \
        "blacklist values must all be 0/1"
    df_pivot = dfd.pivot(index='real_date', columns='cid', values='value')
    dates = df_pivot.index
    cids_df = list(df_pivot.columns)
    if nan_black:  # replace NaNs
        df_pivot = df_pivot.fillna(1)
    else:
        df_pivot = df_pivot.fillna(0)
    dates_dict = {}
    for cid in cids_df:
        count = 0
        column = df_pivot[cid].to_numpy()
        si = 0
        for k, v in groupby(column):  # iterator of consecutive keys and values
            v = list(v)  # instantiate the iterable in memory.
            length = len(v)
            if v[0] == 1:  # if blacklist period
                if count == 0:
                    dates_dict[cid] = startend(dates, si, length)
                elif count == 1:
                    val = dates_dict.pop(cid)
                    dates_dict[cid + '_1'] = val   # change key if more than 1 per cid
                    count += 1
                    dates_dict[cid + '_' + str(count)] = startend(dates, si, length)
                else:
                    dates_dict[cid + '_' + str(count)] = startend(dates, si, length)
                count += 1
            si += length
    return dates_dict