def rm_from_pattern(dir, pattern):
    for f in os.listdir(dir):
        if re.search(pattern, f):
                os.remove(os.path.join(dir, f))
Get a db session
dataset/ETHPy150Open oleiade/Elevator/tests/core/utils.py/rm_from_pattern--crossover with--dataset/ETHPy150Open jupyterhub/jupyterhub/jupyterhub/tests/conftest.py/db