code: def partial_tensor_to_vec(tensor, skip_begin=1, skip_end=0):
      """Partially vectorises a tensor
  
          Partially vectorises a tensor while ignoring the specified dimension at the beginning and the end
  
      Parameters
      ----------
      tensor : ndarray
          tensor to partially vectorise
      skip_begin : int, optional, default is 1
          number of dimensions to leave untouched at the beginning
      skip_end : int, optional
          number of dimensions to leave untouched at the end
  
      Returns
      -------
      ndarray
          partially vectorised tensor with the `skip_begin` first and `skip_end` last dimensions untouched
      """
      return partial_unfold(
          tensor,
          mode=0,
          skip_begin=skip_begin,
          skip_end=skip_end,
          ravel_tensors=True,
      )
  
file_path: tensorly/tensorly/base.py
imports: from math import prod
  from .None import backend
label_desc: Use image node_id 7 for calling a global function with example usage: partial_tensor_to_vec(tensor, skip_begin, skip_end) and returns: partial_unfold