human
I wrote the below code

    def switch_rl(expr):
        rl = ruledict.get(key(expr), identity)
        return rl(expr)
    return switch_rl

What's a good function header?
assistant
#Here's a good function header.

def switch(key, ruledict):