code: def _extract_logger_info_one_model(
      model: nn.Module,
      results: NSResultsType,
      logger_cls: Callable,
  ) -> None:
      torch._C._log_api_usage_once(
          "quantization_api._numeric_suite_fx._extract_logger_info_one_model"
      )
      for gm_name, mod in model.named_modules():
          # TODO(future PR): better check when scripted
          is_logger = isinstance(
              mod, logger_cls
          ) or (  # type: ignore[arg-type]
              isinstance(mod, torch.jit.RecursiveScriptModule)
              and mod.original_name == "OutputLogger"
          )
          if is_logger:
              key = mod.ref_name
              if key not in results:
                  results[key] = {}
              assert (
                  mod.model_name not in results[key]
              ), f"{mod.model_name} is already present in results"
              if mod.results_type not in results[key]:
                  results[key][mod.results_type] = {}
              if mod.model_name not in results[key][mod.results_type]:
                  results[key][mod.results_type][mod.model_name] = []
              stats_to_use = mod.stats
              if len(mod.stats_rnn) > 0:
                  stats_to_use = mod.stats_rnn
              data = {
                  "type": mod.results_type,
                  "values": stats_to_use,
                  "ref_node_name": mod.ref_node_name,
                  "ref_node_target_type": mod.ref_node_target_type,
                  "prev_node_name": mod.prev_node_name,
                  "prev_node_target_type": mod.prev_node_target_type,
                  "index_within_arg": mod.index_within_arg,
                  "index_of_arg": mod.index_of_arg,
                  "fqn": mod.fqn,
                  "qconfig_str": mod.qconfig_str,
              }
              if hasattr(mod, "comparisons"):
                  data["comparisons"] = mod.comparisons
                  data["comparison_fn_name"] = mod.comparison_fn_name
              else:
                  data["comparisons"] = []
                  data["comparison_fn_name"] = ""
              results[key][mod.results_type][mod.model_name].append(
                  data
              )
              # ensure the list stays sorted
              results[key][mod.results_type][mod.model_name].sort(
                  key=lambda res: f"{res['index_of_arg']}:{res['index_within_arg']}"
              )
  
imports: import collections
  import torch
  import torch.nn
  import torch.ao.quantization.quantize_fx
  from torch.fx import GraphModule
  from torch.fx.graph import Node
  from torch.ao.ns.fx.mappings import get_base_name_to_sets_of_related_ops
  from torch.ao.ns.fx.graph_matcher import get_matching_subgraph_pairs, get_type_a_related_to_b
  from .fx.weight_utils import extract_weight_from_node
  from .fx.graph_passes import add_loggers_to_model, create_a_shadows_b
  from .fx.utils import rekey_logger_info_on_node_name_of_model, maybe_add_missing_fqns, get_target_type_str
  from .fx.ns_types import NSSingleResultValuesType, NSResultsType, NSNodeTargetType
  from torch.ao.quantization.backend_config.utils import get_fusion_pattern_to_root_node_getter
  from torch.ao.quantization.backend_config import BackendConfig
  from torch.ao.quantization.fx.match_utils import _find_matches
  from torch.ao.quantization.fx.graph_module import _get_observed_graph_module_attr
  from torch.ao.quantization.fx.qconfig_mapping_utils import _generate_node_name_to_qconfig
  from torch.ao.quantization.fx.quantize_handler import _get_pattern_to_quantize_handlers
  from torch.ao.quantization.qconfig import QConfigAny
  from torch.ao.quantization import QConfigMapping
  from torch.ao.ns.fx.n_shadows_utils import OutputProp, _get_dedup_subgraphs, SHADOW_WRAPPER_NODE_NAME_PREFIX, group_results_by_subgraph, create_results_comparison, print_n_shadows_summary, create_n_transformed_and_logged_copies_of_subgraph, create_add_loggers_graph, extract_weight_comparison
  from torch.ao.ns.fx.qconfig_multi_mapping import QConfigMultiMapping
  from typing import Dict, Tuple, Callable, List, Optional, Set, Any, Type
label_desc: Use image node_id 7 for calling a global function with example usage: _extract_logger_info_one_model(model, results, logger_cls) without return types