def find_action(self, rules, filename):
        for (filename_pattern, action) in rules:
            if re.match(filename_pattern, filename):
                return action
        return None
Given a list of rules and a filename to match against them, returns
dataset/ETHPy150Open dropbox/emmer/emmer/response_router.py/ResponseRouter.find_action