def _files_in_dir(dir, filter=None):
    """Return list of files in dir/, filter is optional list of extensions to look for."""
    if filter:
        files = [x for x in glob.glob(os.path.join(dir, "*")) if _extension(x) in filter]
    else:
        files = [x for x in glob.glob(os.path.join(dir, "*"))]
    return files
dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/actorstore/store.py/_files_in_dir/original