def _serialize(dict_, outer_sep=';', inner_sep=':'):
    s = []
    for key, value in dict_.items():
        if callable(value):
            value = value.__name__
        elif isinstance(value, int):
            value = int(value)
        elif isinstance(value, dict):
            # py35 json does not support numpy int64
            for subkey, subvalue in value.items():
                if isinstance(subvalue, list):
                    if len(subvalue) > 0:
                        if isinstance(subvalue[0], (int, np.integer)):
                            value[subkey] = [int(i) for i in subvalue]

        for cls in (np.random.RandomState, Covariance):
            if isinstance(value, cls):
                value = cls.__name__

        s.append(key + inner_sep + json.dumps(value))

    return outer_sep.join(s)
Translate a shell-like glob pattern to a regular expression.
dataset/ETHPy150Open mne-tools/mne-python/mne/preprocessing/ica.py/_serialize--crossover with--dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/distutils/filelist.py/glob_to_re