code: def create_build_graph(self, target_roots, build_root=None):
      
      logger.debug('target_roots are: %r', target_roots)
      graph = LegacyBuildGraph.create(self.scheduler_session, self.build_file_aliases)
      logger.debug('build_graph is: %s', graph)
      # Ensure the entire generator is unrolled.
      for _ in graph.inject_roots_closure(target_roots):
        pass
  
      address_mapper = LegacyAddressMapper(self.scheduler_session, build_root or get_buildroot())
      logger.debug('address_mapper is: %s', address_mapper)
      return graph, address_mapper
docs: Construct and return a `BuildGraph` given a set of input specs.
  
      :param TargetRoots target_roots: The targets root of the request.
      :param string build_root: The build root.
      :returns: A tuple of (BuildGraph, AddressMapper).