def _filenames_from_arg(filename):
    if isinstance(filename, string_types):
        filenames = [filename]
    elif isinstance(filename, (list, tuple)):
        filenames = filename
    else:
        raise Exception('filename argument must be string, list or tuple')
    for fn in filenames:
        if not os.path.exists(fn):
            raise ValueError('file not found: %s' % fn)
        if not os.path.isfile(fn):
            raise ValueError('not a file: %s' % fn)
    return filenames


# TODO replace this with use of Python standard libary logging support
Callback for updating the OperationalSlots table when an AvailabilitySlot
dataset/ETHPy150Open alimanfoo/vcfnp/vcfnp/array.py/_filenames_from_arg--crossover with--dataset/ETHPy150Open satnet-project/server/services/scheduling/signals/operational.py/availability_slot_added