code: def add_op_to_sets_of_related_ops(
      base_name_to_sets_of_related_ops: Dict[
          str, Set[NSNodeTargetType]
      ],
      op: NSNodeTargetType,
      related_op: Optional[NSNodeTargetType],
  ) -> None:
      if related_op is not None:
          for (
              set_of_related_ops
          ) in base_name_to_sets_of_related_ops.values():
              if related_op in set_of_related_ops:
                  set_of_related_ops.add(op)
                  return
          # if we got here, related_op was not found
          raise AssertionError(f"{related_op} was not found")
      else:
          counter = 0
          while str(counter) in base_name_to_sets_of_related_ops:
              counter += 1
          base_name_to_sets_of_related_ops[str(counter)] = {op}
  
imports: import operator
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.ao.nn.quantized
  import torch.ao.nn.quantized.dynamic
  import torch.ao.nn.intrinsic.quantized
  import torch.ao.nn.intrinsic.quantized.dynamic
  import torch.ao.nn.intrinsic.qat
  import torch.ao.nn.intrinsic
  import torch.ao.nn.qat
  import torch.ao.nn.qat.dynamic
  from torch.ao.quantization.backend_config import get_native_backend_config
  import torch.ao.quantization.fx._lower_to_native_backend
  import torch.ao.quantization.quantization_mappings
  from .ns_types import NSNodeTargetType
  from typing import Callable, Dict, List, Optional, Set, Tuple
label_desc: Use image node_id 3 for calling a global function with example usage: add_op_to_sets_of_related_ops(base_name_to_sets_of_related_ops, op, related_op) without return types