code: def _fix_sequence_arg(arg, ndim, name, conv=lambda x: x):
      if isinstance(arg, str):
          return [conv(arg)] * ndim
      try:
          arg = iter(arg)
      except TypeError:
          return [conv(arg)] * ndim
      lst = [conv(x) for x in arg]
      if len(lst) != ndim:
          msg = "{} must have length equal to input rank".format(name)
          raise RuntimeError(msg)
      return lst
  
file_path: cupy/cupyx/scipy/ndimage/_util.py
imports: import warnings
  import numpy
  import cupy
label_desc: Use image node_id 6 for calling a global function with example usage: _fix_sequence_arg(arg, ndim, name, conv) and returns: lst, unknown, unknown