code: def get_decompositions(
      aten_ops: Sequence[
          Union[torch._ops.OperatorBase, OpOverloadPacket]
      ],
      type: str = "post_autograd",
  ) -> Dict[torch._ops.OperatorBase, Callable]:
      """
      Retrieve a dictionary of decompositions corresponding to the list of
      operator overloads and overload packets passed as input.  Overload
      packets will include all decomposed overloads in the packet.  If there is
      no decomposition for a requested operator, it is silently ignored.
  
      This API is experimental; we are almost certainly going to give an alternate,
      more recommended formulation, where a user provides the set of operators
      they know how to implement, and we provide decompositions for everything
      not in this set.
      """
      assert type in {"post_autograd", "pre_autograd", "meta"}
  
      registry = global_decomposition_table[type]
      packets_to_overloads = defaultdict(list)
      for opo in registry:
          if isinstance(opo, (OpOverload, OpOverloadPacket)):
              packets_to_overloads[opo.overloadpacket].append(opo)
      decompositions: Dict[torch._ops.OperatorBase, Callable] = {}
      for op in aten_ops:
          if (
              isinstance(op, OpOverloadPacket)
              and op in packets_to_overloads
          ):
              for op_overload in packets_to_overloads[op]:
                  decompositions[op_overload] = registry[op_overload]
          elif (
              isinstance(op, (torch._ops.OperatorBase))
              and op in registry
          ):
              decompositions[op] = registry[op]
      return decompositions
  
file_path: pytorch/torch/_decomp/__init__.py
imports: import inspect
  from collections import defaultdict
  from functools import wraps
  from itertools import chain
  from typing import Callable, Dict, List, Sequence, Union
  import torch
  import torch.library
  from torch._ops import HigherOrderOperator, OpOverload, OpOverloadPacket
  from torch._prims_common import CustomOutParamAnnotation
  from torch.utils import _pytree
  import torch._decomp.decompositions
  import torch._refs
label_desc: Use image node_id 4 for calling a global function with example usage: get_decompositions(aten_ops, type) and returns: decompositions