code: def multi_mode_dot(
      tensor, matrix_or_vec_list, modes=None, skip=None, transpose=False
  ):
      """n-mode product of a tensor and several matrices or vectors over several modes
  
      Parameters
      ----------
      tensor : ndarray
  
      matrix_or_vec_list : list of matrices or vectors of length ``tensor.ndim``
  
      skip : None or int, optional, default is None
          If not None, index of a matrix to skip.
          Note that in any case, `modes`, if provided, should have a length of ``tensor.ndim``
  
      modes : None or int list, optional, default is None
  
      transpose : bool, optional, default is False
          If True, the matrices or vectors in in the list are transposed.
          For complex tensors, the conjugate transpose is used.
  
      Returns
      -------
      ndarray
          tensor times each matrix or vector in the list at mode `mode`
  
      Notes
      -----
      If no modes are specified, just assumes there is one matrix or vector per mode and returns:
  
      :math:`\\text{tensor  }\\times_0 \\text{ matrix or vec list[0] }\\times_1 \\cdots \\times_n \\text{ matrix or vec list[n] }`
  
      See also
      --------
      mode_dot
      """
      if modes is None:
          modes = range(len(matrix_or_vec_list))
  
      decrement = 0  # If we multiply by a vector, we diminish the dimension of the tensor
  
      res = tensor
  
      # Order of mode dots doesn't matter for different modes
      # Sorting by mode shouldn't change order for equal modes
      factors_modes = sorted(
          zip(matrix_or_vec_list, modes), key=lambda x: x[1]
      )
      for i, (matrix_or_vec, mode) in enumerate(factors_modes):
          if (skip is not None) and (i == skip):
              continue
  
          if transpose:
              res = mode_dot(
                  res,
                  T.conj(T.transpose(matrix_or_vec)),
                  mode - decrement,
              )
          else:
              res = mode_dot(res, matrix_or_vec, mode - decrement)
  
          if T.ndim(matrix_or_vec) == 1:
              decrement += 1
  
      return res
  
imports: from ...None import backend
  from ...None import unfold, fold, vec_to_tensor
label_desc: Use image node_id 2 for calling a global function with example usage: multi_mode_dot(tensor, matrix_or_vec_list, modes, skip, transpose) and returns: res