def decode_trfrm(transform_name, locals=None):
    """
    Converts a description of a transformation name into an actual transformation.

    Parameters:
        transform_name: Either the name of a Preprocess class, or as string in form 'FN(<field>, <func>)'.
                        In the second case a FuncAndNormalize class is created.
        locals: dict that contains the defined functions in the current scope. Useful for calling this function
                from outside preprocess.py where there are additional functions.
    """
    names = dict(globals())
    if locals is not None:
        names.update(locals)
    return names[transform_name]