code: def apply_delta_kernel(X: np.ndarray) -> np.ndarray:
      """Applies the delta kernel, i.e. the distance is 1 if two entries are equal and 0 otherwise.
  
      :param X: Input data.
      :return: The outcome of the delta-kernel, a binary distance matrix.
      """
      X = shape_into_2d(X)
      return (
          np.array(list(map(lambda value: value == X, X)))
          .reshape(X.shape[0], X.shape[0])
          .astype(np.float)
      )
  
file_path: dowhy/dowhy/gcm/independence_test/kernel_operation.py
imports: from typing import Optional
  import numpy
  from sklearn.kernel_approximation import Nystroem
  from sklearn.metrics import euclidean_distances
  from dowhy.gcm.util.general import shape_into_2d
label_desc: Use image node_id 3 for calling a global function with example usage: apply_delta_kernel(X) and returns: np