code: def _apply_kernels(X, kernels):
      (
          weights,
          lengths,
          biases,
          dilations,
          paddings,
          num_channel_indices,
          channel_indices,
      ) = kernels
  
      n_instances, n_columns, _ = X.shape
      num_kernels = len(lengths)
  
      _X = np.zeros(
          (n_instances, num_kernels * 2), dtype=np.float32
      )  # 2 features per kernel
  
      for i in prange(n_instances):
          a1 = 0  # for weights
          a2 = 0  # for channel_indices
          a3 = 0  # for features
  
          for j in range(num_kernels):
              b1 = a1 + num_channel_indices[j] * lengths[j]
              b2 = a2 + num_channel_indices[j]
              b3 = a3 + 2
  
              if num_channel_indices[j] == 1:
                  _X[i, a3:b3] = _apply_kernel_univariate(
                      X[i, channel_indices[a2]],
                      weights[a1:b1],
                      lengths[j],
                      biases[j],
                      dilations[j],
                      paddings[j],
                  )
  
              else:
                  _weights = weights[a1:b1].reshape(
                      (num_channel_indices[j], lengths[j])
                  )
  
                  _X[i, a3:b3] = _apply_kernel_multivariate(
                      X[i],
                      _weights,
                      lengths[j],
                      biases[j],
                      dilations[j],
                      paddings[j],
                      num_channel_indices[j],
                      channel_indices[a2:b2],
                  )
  
              a1 = b1
              a2 = b2
              a3 = b3
  
      return _X.astype(np.float32)
  
imports: import numpy
  from sktime.utils.numba.njit import njit
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 4 for calling a global function with example usage: _apply_kernels(X, kernels) and returns: _X