code: def conditional_MI(data=None, x=None, y=None, z=None):
      """
      Method to return conditional mutual information between X and Y given Z
      I(X, Y | Z) = H(X|Z) - H(X|Y,Z)
                  = H(X,Z) - H(Z) - H(X,Y,Z) + H(Y,Z)
                  = H(X,Z) + H(Y,Z) - H(X,Y,Z) - H(Z)
      :param data : dataset
      :param x,y,z : column names from dataset
      :returns : conditional mutual information between X and Y given Z
      """
      X = data[list(x)].astype(int)
      Y = data[list(y)].astype(int)
      t = list(z)
      Z = data[t].astype(int)
      Z = Z.values.tolist()
      Z = list(data[t].itertuples(index=False, name=None))
      Hxz = entropy(
          map(lambda x: "%s/%s" % x, zip(X, Z))
      )  # Finding Joint entropy of X and Z
      Hyz = entropy(
          map(lambda x: "%s/%s" % x, zip(Y, Z))
      )  # Finding Joint entropy of Y and Z
      Hz = entropy(Z)  # Finding Entropy of Z
      Hxyz = entropy(
          map(lambda x: "%s/%s/%s" % x, zip(X, Y, Z))
      )  # Finding Joint Entropy of X, Y and Z
      return Hxz + Hyz - Hxyz - Hz
  
file_path: dowhy/dowhy/utils/cit.py
imports: from collections import defaultdict
  from math import log
  import numpy
  from scipy.stats import norm, t
label_desc: Use image node_id 4 for calling a global function with example usage: conditional_MI(data, x, y, z) and returns: unknown