def parse_file(filename):
    """Parse the provided file, and return Code object."""
    assert isinstance(filename, _str_type), "`filename` parameter should be a string, got %r" % type(filename)
    with open(filename, "rt", encoding="utf-8") as f:
        return Code(_tokenize(f.readline))