code: def _get_all_later_node_usages(
      tensor_aliases: Set[Node], op_index: int
  ):
      def _add_if_tensor(x, set_):
          if isinstance(x, FakeTensor):
              set_.add(StorageWeakRef(x._typed_storage()))
  
      nodes_used_after = set()
      for t in tensor_aliases:
          # get all nodes that use the current alias
          usage_nodes = t.users
          for n in usage_nodes:
              # We only care about usages after the current node
              if (
                  "node_idx" not in n.meta
                  or n.meta["node_idx"] <= op_index
              ):
                  continue
              # We also don't care about intermediate view ops.
              # They only matter if their output is then used elsewhere
              # (either in an out-of-place op, or as an output to the function).
              if n in tensor_aliases:
                  if (
                      isinstance(n.target, torch._ops.OpOverload)
                      or n.target == _operator.getitem
                  ):
                      continue
              nodes_used_after.add(n)
      return nodes_used_after
  
imports: import torch
  from torch.fx import Node
  from torch.fx._compatibility import compatibility
  from torch._subclasses.fake_tensor import FakeTensorMode, FakeTensor
  from torch.utils._pytree import tree_map_only
  from torch.utils import _pytree
  from torch.multiprocessing.reductions import StorageWeakRef
  import _operator
  from enum import Enum
  import itertools
  from typing import Set, Dict
  from collections import defaultdict
label_desc: Use image node_id 5 for calling a global function with example usage: _get_all_later_node_usages(tensor_aliases, op_index) and returns: nodes_used_after