def lookup(var_name, contexts=(), start=<NUM_LIT:0>):
start = len(contexts) if start >=<NUM_LIT:0> else start<EOL>for context in reversed(contexts[:start]):<EOL><INDENT>try:<EOL><INDENT>if var_name in context:<EOL><INDENT>return context[var_name]<EOL><DEDENT><DEDENT>except TypeError as te:<EOL><INDENT>continue<EOL><DEDENT><DEDENT>return None<EOL>
lookup the value of the var_name on the stack of contexts

    :var_name: TODO
    :contexts: TODO
    :returns: None if not found