docs: def read(self, f):
          """
          Read in an SBOL file, replacing current document contents
          """
          self.clear_document()
  
          g = Graph()
          g.parse(f, format='xml')
  
          for n in g.namespaces():
              ns = n[1].toPython()
              if not ns.endswith(('#', '/', ':')):
                  ns = ns + '/'
              self._namespaces[n[0]] = ns
              # Extend the existing namespaces available
              XML_NS[n[0]] = ns
  
          self._read_sequences(g)
          self._read_component_definitions(g)
          self._extend_component_definitions(g)
          self._read_models(g)
          self._read_module_definitions(g)
          self._extend_module_definitions(g)
          self._read_annotations(g)
          # Last as this needs all other top level objects created
          self._read_collections(g)