code: def scan(self, root=None):
      
      build_graph = self.build_graph.clone_new()
      for address in self.address_mapper.scan_addresses(root):
        build_graph.inject_address_closure(address)
      return build_graph
docs: Scans and parses all BUILD files found under ``root``.
  
      Only BUILD files found under ``root`` are parsed as roots in the graph, but any dependencies of
      targets parsed in the root tree's BUILD files will be followed and this may lead to BUILD files
      outside of ``root`` being parsed and included in the returned build graph.
  
      :API: public
  
      :param string root: The path to scan; by default, the build root.
      :returns: A new build graph encapsulating the targets found.