def _generate_weight(label, nl_symbol, n_fold):
    """ Generate weights based on one multi-label label.
    label (str): multi-label or multi-class label
    nl_symbol (str): the symbol representing no label
    n_fold (float): unlabeled has n_fold weight value comparing to labeled
    ===========================================================================
    return (list): weights
    """
    weights = [1] * len(label)
    for i, lbl in enumerate(label):
        if lbl == nl_symbol:
            weights[i] = n_fold
    return weights