def search_file_upwards(name, base=None):
base = base or os.getcwd()<EOL>while base != os.path.dirname(base):<EOL><INDENT>if os.path.exists(os.path.join(base, name)):<EOL><INDENT>return base<EOL><DEDENT>base = os.path.dirname(base)<EOL><DEDENT>return None<EOL>
Search for a file named `name` from cwd or given directory to root.
        Return None if nothing's found.