code: def vectorize_args(input_types, args):
      """Vectorize input args.
  
      Transform input array-like args into their fully-vectorized form,
      where "fully-vectorized" means that:
  
      - one scalar has shape [1, 1],
      - n scalars have shape [n, 1],
      - one d-D vector has shape [1, d],
      - n d-D vectors have shape [n, d],
      etc.
  
      Parameters
      ----------
      input_types : list
          Point types corresponding to the args.
      args : tuple
          Args of a function.
  
      Returns
      -------
      vect_args : tuple
          Args of the function in their fully-vectorized form.
      """
      vect_args = []
      for arg, input_type in zip(args, input_types):
          if input_type == "scalar":
              vect_arg = gs.to_ndarray(arg, to_ndim=1)
              vect_arg = gs.to_ndarray(vect_arg, to_ndim=2, axis=1)
          elif input_type in POINT_TYPES and arg is not None:
              vect_arg = gs.to_ndarray(
                  arg, to_ndim=POINT_TYPES_TO_NDIMS[input_type]
              )
          elif input_type in OTHER_TYPES or arg is None:
              vect_arg = arg
          else:
              raise ValueError(ERROR_MSG % input_type)
          vect_args.append(vect_arg)
      return tuple(vect_args)
  
file_path: geomstats/geomstats/vectorization.py
imports: import math
  import geomstats.backend
label_desc: Use image node_id 11 for calling a global function with example usage: vectorize_args(input_types, args) and returns: tuple