human
Can you provide a the Python code you requested given the following:
Complete the below
def chain(*rules):

    ''''Compose a sequence of rules so that they apply to the expr sequentially'
    '''
assistant
#Here is the Python code you requested.
    def chain_rl(expr):
        for rule in rules:
            expr = rule(expr)
        return expr
    return chain_rl