code: def _make_3d_series(x: np.ndarray) -> np.ndarray:
      """Check a series being passed into pairwise is 3d.
  
      Pairwise assumes it has been passed two sets of series, if passed a single
      series this function reshapes.
  
      If given a 1d array the time series is reshaped to (m, 1, 1). This is so when
      looped over x[i] = (1, m).
  
      If given a 2d array then the time series is reshaped to (d, 1, m). The dimensions
      are put to the start so the ts can be looped through correctly. When looped over
      the time series x[i] = (d, m).
  
      Parameters
      ----------
      x: np.ndarray, 2d or 3d
  
      Returns
      -------
      np.ndarray, 3d
      """
      num_dims = x.ndim
      if num_dims == 1:
          shape = x.shape
          _x = np.reshape(x, (shape[0], 1, 1))
      elif num_dims == 2:
          shape = x.shape
          _x = np.reshape(x, (shape[0], 1, shape[1]))
      elif num_dims > 3:
          raise ValueError(
              "The matrix provided has more than 3 dimensions. This is not"
              "supported. Please provide a matrix with less than "
              "3 dimensions"
          )
      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 1 for calling a global function with example usage: _make_3d_series(x) and returns: _x