code: def Document(filename):
      tree = ElementTree.parse(filename)
      root = tree.getroot()
      if root.tag != namespace + "svg":
          text = (
              'File "%s" does not seem to be a valid SVG file'
              % filename
          )
          raise TypeError(text)
      return SVG(root)
  
imports: from .svg import SVG
  from .path import Path
  from .base import namespace
  from xml.etree import ElementTree
label_desc: Use image node_id 1 for calling a global function with example usage: Document(filename) and returns: SVG