code: def add_file_recursive(self, filename, trim=False):
          
  
          assert not self.final, 'Trying to mutate a final graph.'
          self.add_source_file(filename)
          queue = collections.deque([filename])
          seen = set()
          while queue:
              filename = queue.popleft()
              self.graph.add_node(filename)
              try:
                  deps, broken = self.get_file_deps(filename)
              except parsepy.ParseError:
                  # Python couldn't parse `filename`. If we're sure that it is a
                  # Python file, we mark it as unreadable and keep the node in the
                  # graph so importlab's callers can do their own syntax error
                  # handling if desired.
                  if filename.endswith('.py'):
                      self.unreadable_files.add(filename)
                  else:
                      self.graph.remove_node(filename)
                  continue
              for f in broken:
                  self.broken_deps[filename].add(f)
              for f in deps:
                  if self.follow_file(f, seen, trim):
                      queue.append(f)
                      seen.add(f)
                  self.graph.add_node(f)
                  self.graph.add_edge(filename, f)
docs: Add a file and all its recursive dependencies to the graph.
  
          Args:
            filename: The name of the file.
            trim: Whether to trim the dependencies of builtin and system files.