code: def normalize(i, parentsize):
      if isinstance(i, slice):
          i = (i.start, i.stop, i.step)
      if not isinstance(i, (tuple, list, Tuple)):
          if (i < 0) == True:
              i += parentsize
          i = (i, i + 1, 1)
      i = list(i)
      if len(i) == 2:
          i.append(1)
      start, stop, step = i
      start = start or 0
      if stop is None:
          stop = parentsize
      if (start < 0) == True:
          start += parentsize
      if (stop < 0) == True:
          stop += parentsize
      step = step or 1
  
      if ((stop - start) * step < 1) == True:
          raise IndexError()
  
      return (start, stop, step)
  
file_path: sympy/sympy/matrices/expressions/slice.py
imports: from sympy.matrices.expressions.matexpr import MatrixExpr
  from sympy.core.basic import Basic
  from sympy.core.containers import Tuple
  from sympy.functions.elementary.integers import floor
label_desc: Use image node_id 1 for calling a global function with example usage: normalize(i, parentsize) and returns: start,  stop,  step