def code_unit_factory(morfs, file_locator):
    # Be sure we have a list.
    if not isinstance(morfs, (list, tuple)):
        morfs = [morfs]

    # On Windows, the shell doesn't expand wildcards.  Do it here.
    globbed = []
    for morf in morfs:
        if isinstance(morf, string_class) and ('?' in morf or '*' in morf):
            globbed.extend(glob.glob(morf))
        else:
            globbed.append(morf)
    morfs = globbed

    code_units = [CodeUnit(morf, file_locator) for morf in morfs]

    return code_units
Construct a list of CodeUnits from polymorphic inputs.
dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/coverage/codeunit.py/code_unit_factory