code: def _upcast_int_indices(index):
      if isinstance(index, torch.Tensor):
          if index.dtype in (
              torch.int8,
              torch.int16,
              torch.int32,
              torch.uint8,
          ):
              return index.to(torch.int64)
      elif isinstance(index, tuple):
          return tuple(_upcast_int_indices(i) for i in index)
      return index
  
imports: from __future__ import annotations
  import builtins
  import math
  import operator
  from typing import Sequence
  import torch
  from .None import _dtypes, _dtypes_impl, _funcs, _ufuncs, _util
  from ._normalizations import ArrayLike, normalize_array_like, normalizer, NotImplementedType
label_desc: Use image node_id 2 for calling a global function with example usage: _upcast_int_indices(index) and returns: index, index, tuple