code: def _populate_affected_issues(self, graph: TraceGraph) -> None:
          
          affected_instance_ids = [
              instance.id.local_id
              for instance in graph._issue_instances.values()
              if self._is_filename_prefixed_with(
                  graph.get_text(instance.filename_id), self._affected_files
              )
          ]
  
          for instance_id in affected_instance_ids:
              if instance_id in self._issue_instances:
                  continue
              self._populate_issue_and_traces(graph, instance_id)
docs: Populates the trimmed graph with issues whose locations are in
          affected_files based on data in the input graph. Since these issues
          exist in the affected files, all traces are copied as well.