def add_variability_to_fakelc_collection(simbasedir,<EOL>override_paramdists=None,<EOL>overwrite_existingvar=False):
<EOL>infof = os.path.join(simbasedir,'<STR_LIT>')<EOL>with open(infof, '<STR_LIT:rb>') as infd:<EOL><INDENT>lcinfo = pickle.load(infd)<EOL><DEDENT>lclist = lcinfo['<STR_LIT>']<EOL>varflag = lcinfo['<STR_LIT>']<EOL>vartypes = lcinfo['<STR_LIT>']<EOL>vartind = <NUM_LIT:0><EOL>varinfo = {}<EOL>for lc, varf, _lcind in zip(lclist, varflag, range(len(lclist))):<EOL><INDENT>if varf:<EOL><INDENT>thisvartype = vartypes[vartind]<EOL>if (override_paramdists and<EOL>isinstance(override_paramdists, dict) and<EOL>thisvartype in override_paramdists and<EOL>isinstance(override_paramdists[thisvartype], dict)):<EOL><INDENT>thisoverride_paramdists = override_paramdists[thisvartype]<EOL><DEDENT>else:<EOL><INDENT>thisoverride_paramdists = None<EOL><DEDENT>varlc = add_fakelc_variability(<EOL>lc, thisvartype,<EOL>override_paramdists=thisoverride_paramdists,<EOL>overwrite=overwrite_existingvar<EOL>)<EOL>varinfo[varlc['<STR_LIT>']] = {'<STR_LIT>': varlc['<STR_LIT>'],<EOL>'<STR_LIT>': varlc['<STR_LIT>']}<EOL>vartind = vartind + <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>varlc = add_fakelc_variability(<EOL>lc, None,<EOL>overwrite=overwrite_existingvar<EOL>)<EOL>varinfo[varlc['<STR_LIT>']] = {'<STR_LIT>': varlc['<STR_LIT>'],<EOL>'<STR_LIT>': varlc['<STR_LIT>']}<EOL><DEDENT><DEDENT>lcinfo['<STR_LIT>'] = varinfo<EOL>tempoutf = '<STR_LIT>' % (infof, md5(npr.bytes(<NUM_LIT:4>)).hexdigest()[-<NUM_LIT:8>:])<EOL>with open(tempoutf, '<STR_LIT:wb>') as outfd:<EOL><INDENT>pickle.dump(lcinfo, outfd, pickle.HIGHEST_PROTOCOL)<EOL><DEDENT>if os.path.exists(tempoutf):<EOL><INDENT>shutil.copy(tempoutf, infof)<EOL>os.remove(tempoutf)<EOL><DEDENT>else:<EOL><INDENT>LOGEXCEPTION('<STR_LIT>' %<EOL>os.path.dirname(tempoutf))<EOL>raise<EOL><DEDENT>return lcinfo<EOL>
This adds variability and noise to all fake LCs in `simbasedir`.

    If an object is marked as variable in the `fakelcs-info`.pkl file in
    `simbasedir`, a variable signal will be added to its light curve based on
    its selected type, default period and amplitude distribution, the
    appropriate params, etc. the epochs for each variable object will be chosen
    uniformly from its time-range (and may not necessarily fall on a actual
    observed time). Nonvariable objects will only have noise added as determined
    by their params, but no variable signal will be added.

    Parameters
    ----------

    simbasedir : str
        The directory containing the fake LCs to process.

    override_paramdists : dict
        This can be used to override the stored variable parameters in each fake
        LC. It should be a dict of the following form::

            {'<vartype1>': {'<param1>: a scipy.stats distribution function or
                                       the np.random.randint function,
                            .
                            .
                            .
                            '<paramN>: a scipy.stats distribution function
                                       or the np.random.randint function}

        for any vartype in VARTYPE_LCGEN_MAP. These are used to override the
        default parameter distributions for each variable type.

    overwrite_existingvar : bool
        If this is True, then will overwrite any existing variability in the
        input fake LCs in `simbasedir`.

    Returns
    -------

    dict
        This returns a dict containing the fake LC filenames as keys and
        variability info for each as values.