code: def _get_argindex(subindices, ind):
      for i, sind in enumerate(subindices):
          if ind == sind:
              return i
          if isinstance(sind, (set, frozenset)) and ind in sind:
              return i
      raise IndexError("%s not found in %s" % (ind, subindices))
  
file_path: sympy/sympy/tensor/array/expressions/utils.py
imports: import bisect
  from collections import defaultdict
  from sympy.combinatorics import Permutation
  from sympy.core.containers import Tuple
  from sympy.core.numbers import Integer
label_desc: Use image node_id 5 for calling a global function with example usage: _get_argindex(subindices, ind) and returns: i, i