code: def vmap(
      func: Callable,
      in_axes: Union[int, Sequence[int], Sequence[None]] = 0,
      out_axes: int = 0,
  ) -> Callable:
      @ivy.output_to_native_arrays
      @ivy.inputs_to_native_arrays
      def _vmap(*args, **kwargs):
          # convert args tuple to list to allow mutability using moveaxis ahead.
          args = list(args)
  
          # if in_axis is a non-integer, its length should be equal to pos args.
          if isinstance(in_axes, (list, tuple)):
              ivy.utils.assertions.check_equal(
                  len(args),
                  len(in_axes),
                  message="""in_axes should have a length equivalent to the number
                  of positional arguments to the function being vectorized or it
                  should be an integer""",
                  as_array=False,
              )
  
          # checking axis_size consistency
          axis_size = set()
  
          if isinstance(in_axes, int):
              for arg in args:
                  axis_size.add(arg.shape[in_axes])
          elif isinstance(in_axes, (list, tuple)):
              for arg, axis in zip(args, in_axes):
                  if axis is not None:
                      axis_size.add(arg.shape[axis])
  
          if len(axis_size) > 1:
              raise ivy.utils.exceptions.IvyException(
                  """Inconsistent sizes. All mapped axes should have the same size"""
              )
  
          # Making sure not all in_axes are None
          if isinstance(in_axes, (list, tuple)):
              ivy.utils.assertions.check_any(
                  [ivy.exists(ax) for ax in in_axes],
                  message="At least one of the axes should be specified (not None)",
                  as_array=False,
              )
          else:
              ivy.utils.assertions.check_exists(
                  in_axes,
                  message="single value in_axes should not be None",
              )
  
          # Handling None in in_axes by broadcasting the axis_size
          if isinstance(in_axes, (tuple, list)) and None in in_axes:
              none_axis_index = []
              for index, axis in enumerate(in_axes):
                  if axis is None:
                      none_axis_index.append(index)
  
              for none_mapped_axis in none_axis_index:
                  args[none_mapped_axis] = tf.broadcast_to(
                      args[none_mapped_axis],
                      (tuple(axis_size) + args[none_mapped_axis].shape),
                  )
  
          # set up the axis to be mapped
          if isinstance(in_axes, (tuple, list)):
              for i in range(len(in_axes)):
                  args[i] = tf.experimental.numpy.moveaxis(
                      args[i], in_axes[i], 0
                  )
          elif isinstance(in_axes, int):
              args[0] = tf.experimental.numpy.moveaxis(
                  args[0], in_axes, 0
              )
  
          # vectorisation - applying map_fn if only one arg provided as reduce requires
          # two elements to begin with.
          arr_results = []
          for arrays in zip(*args):
              single_op = func(*arrays)
              arr_results.append(single_op)
          res = ivy.stack(arr_results)
  
          if out_axes:
              res = tf.experimental.numpy.moveaxis(res, 0, out_axes)
  
          return res
  
      return _vmap
  
imports: from typing import Optional, Union, Sequence, Callable, Tuple
  import numpy
  import multiprocessing
  from numbers import Number
  import tensorflow
  import ivy
  from ivy.functional.ivy.gradients import _is_variable
  from ivy.func_wrapper import with_unsupported_dtypes
  from ivy.utils.exceptions import _check_inplace_update_support
  from .None import backend_version
  from ...ivy.general import _broadcast_to
label_desc: Use image node_id 24 for calling a global function with example usage: vmap(func, in_axes, out_axes) and returns: _vmap, res