code: def _collect_reachable_tensors(
      self,
      nodes: List[NodeProto],
  ) -> Tuple[List[TensorProto], List[ValueInfoProto]]:
      all_tensors_name = set()
      for node in nodes:
          for name in node.input:
              all_tensors_name.add(name)
          for name in node.output:
              all_tensors_name.add(name)
  
      initializer = [
          self.wmap[t] for t in self.wmap if t in all_tensors_name
      ]
      value_info = [
          self.vimap[t] for t in self.vimap if t in all_tensors_name
      ]
      len_sparse_initializer = len(self.graph.sparse_initializer)
      if len_sparse_initializer != 0:
          raise ValueError(
              f"len_sparse_initializer is {len_sparse_initializer}, it must be 0."
          )
      len_quantization_annotation = len(
          self.graph.quantization_annotation
      )
      if len_quantization_annotation != 0:
          raise ValueError(
              f"len_quantization_annotation is {len_quantization_annotation}, it must be 0."
          )
      return initializer, value_info
  
file_path: catboost/contrib/libs/onnx/onnx/utils.py
imports: import os
  from typing import List, Tuple
  import onnx.checker
  import onnx.helper
  import onnx.shape_inference
  from onnx import FunctionProto, ModelProto, NodeProto, TensorProto, ValueInfoProto
label_desc: Use image node_id 9 for calling the Extractor obj's underlying member method code with example usage: obj._collect_reachable_tensors(nodes) and returns: initializer,  value_info