code: def _numba_to_timeseries(x: np.ndarray) -> np.ndarray:
      num_dims = x.ndim
      shape = x.shape
  
      if num_dims > 2:
          raise ValueError(
              "The matrix provided has more than 2 dimensions. This is not"
              "supported. Please provide a matrix with less than "
              "2 dimensions"
          )
  
      if num_dims == 1:
          _x = np.reshape(x, (1, shape[0]))
      else:
          _x = x
  
      return _x
  
file_path: sktime/sktime/distances/_numba_utils.py
imports: from typing import Callable
  import numpy
  from sktime.distances.base import DistanceCallable
  from sktime.utils.numba.njit import njit
label_desc: Use image node_id 5 for calling a global function with example usage: _numba_to_timeseries(x) and returns: _x