def _varied_parameters(parameters, varied, names):
    """
    Help function for identifying parameters that are varied (or fixed)
    in experiments. (Not used anymore in this module.)

    ==========  ===========================================================
    names       names of parameters.
    parameters  values of parameters.
    varied      subset of names (the parameters that are varied elsewhere).
    return      a list of the indices in parameters corresponding varied.
    ==========  ===========================================================

    An example may help to show the idea. Assume we have three parametes
    named 'a', 'b', and 'c'. Their values are 1, 5, and 3, i.e.,
    'a' is 1, 'b' is 5, and 'c' is 3. In a loop elsewhere we assume
    that 'a' and 'c' are varied while 'b' is fixed. This function
    returns a list of the parameter values that correspond to varied
    parameters, i.e., [1,3] in this case, corresponding to the names
    'a' and 'c':

    >>> parameters = [1,5,3]
    >>> names = ['a','b','c']
    >>> varied = ['a','c']
    >>> varied_parameteres(parameters, varied, names)
    [1,3]
    """
    indices_varied = [names.index(i) for i in varied]
    varied_parameters = [parameters[i] for i in indices_varied]
    return varied_parameters