code: def vectorized_map(function, elements):
      if not isinstance(elements, (list, tuple)):
          return np.stack([function(x) for x in elements])
      else:
          batch_size = elements[0].shape[0]
          output_store = []
          for index in range(batch_size):
              output_store.append(
                  function([x[index] for x in elements])
              )
          return np.stack(output_store)
  
imports: import numpy
  import tree
  from keras.backend.common import KerasVariable
  from keras.backend.common import standardize_dtype
  from keras.backend.common.dtypes import result_type
  from keras.backend.common.keras_tensor import KerasTensor
  from keras.backend.common.stateless_scope import StatelessScope
  from keras.utils.nest import pack_sequence_as
label_desc: Use image node_id 7 for calling a global function with example usage: vectorized_map(function, elements) and returns: np, np