code: def _multilist_iterator(arg, func):
      """Iterate over multidiemnsional list and returns new list
      with same dimensions, but applied `func` function on list elements.
      E.g. _multilist_iterator([1, 2, [3, 4]], lambda x: x**2) = [1, 4, [9, 16]]
      """
      ret = []
      if isinstance(arg, list):
          for el in arg:
              ret.append(_multilist_iterator(el, func))
      else:
          return func(arg)
  
      return ret
  
imports: import abc
  import ctypes
  import logging
  import os
  import warnings
  import numpy
  import mxnet
  from ..base import _LIB, check_call, py_str
  from ..base import c_array, c_str, mx_uint, mx_real_t, c_str_array
  from ..base import SymbolHandle
  from ..symbol import Symbol
  from ..None import ndarray
  from ..io import DataDesc
  from ..device import cpu, Device
  from ..util import is_np_array, wrap_ctx_to_device_func
label_desc: Use image node_id 1 for calling a global function with example usage: _multilist_iterator(arg, func) and returns: ret, func