code: def median(X):
      """Numba median function for a 1d numpy array.
  
      Parameters
      ----------
      X : 1d numpy array
          A 1d numpy array of values
  
      Returns
      -------
      median : float
          The median of the input array
      """
      idx = int(X.shape[0] / 2)
      if X.shape[0] % 2 == 1:
          s = np.partition(X, idx)
          return s[idx]
      else:
          s = np.partition(X, [idx - 1, idx])
          return 0.5 * (s[idx - 1] + s[idx])
  
imports: from sktime.utils.validation._dependencies import _check_soft_dependencies
  import numpy
  import sktime.utils.numba.general
  from sktime.utils.numba.njit import njit
label_desc: Use image node_id 7 for calling a global function with example usage: median(X) and returns: s, unknown