code: def _entropy(x, s):
      """Entropy function."""
      e = 0
      for i in x:
          p = i / s if s > 0 else 0
          e += -(p * math.log(p) / 0.6931471805599453) if p > 0 else 0
      return e
  
file_path: sktime/sktime/classification/sklearn/_continuous_interval_tree_numba.py
imports: import math
  import numpy
  from sktime.utils.numba.njit import njit
  from sktime.utils.numba.stats import iqr, mean, numba_max, numba_min, slope, std
label_desc: Use image node_id 2 for calling a global function with example usage: _entropy(x, s) and returns: e