code: def heat_map(
      X, X_prime, y, predictions, eta, plot_path, vmin=None, vmax=None
  ):
      """Generate 3-d heatmap and save it at plot_path.
      Args:
          :param eta: discretization parameter of coefficients defining subgroups
          :param plot_path: the path to save the heatmap at
          :param vmin: Min  value to map: see plot_surface documentation in matplotlib
          :param vmax: Max value to map
  
      Returns:
          :return: the min and max gamma disparities on groups in the plot
      """
      fig = plt.figure()
      ax = fig.add_subplot(1, 1, 1, projection="3d")
      columns = [str(c) for c in X_prime.columns]
      attribute_1 = np.zeros(int(1 / eta))
      attribute_2 = np.zeros(int(1 / eta))
      disparity = np.zeros((int(1 / eta), int(1 / eta)))
  
      for i in range(int(1 / eta)):
          for j in range(int(1 / eta)):
              beta = [-1 + 2 * eta * i, -1 + 2 * eta * j]
              group = LinearThresh(beta)
  
              attribute_1[i] = beta[0]
              attribute_2[j] = beta[1]
              disparity[i, j] = calc_disp(
                  predictions, X, y, X_prime, group
              )
  
      X_plot, Y_plot = np.meshgrid(attribute_1, attribute_2)
  
      ax.set_xlabel(columns[0] + " coefficient")
      ax.set_ylabel(columns[1] + " coefficient")
      ax.set_zlabel("gamma disparity")
      ax.set_zlim3d([np.min(disparity), np.max(disparity)])
      surface = ax.plot_surface(
          X_plot,
          Y_plot,
          disparity,
          cmap=cm.coolwarm,
          linewidth=0,
          antialiased=False,
          vmin=vmin,
          vmax=vmax,
      )
      if plot_path != ".":
          fig.savefig("{}.png".format(plot_path))
          plt.close()
      return [np.min(disparity), np.max(disparity)]
  
imports: import matplotlib
  import pandas
  import matplotlib.pyplot
  from matplotlib import cm
  from mpl_toolkits.mplot3d import Axes3D
  from aif360.algorithms.inprocessing.gerryfair.reg_oracle_class import *
label_desc: Use image node_id 2 for calling a global function with example usage: heat_map(X, X_prime, y, predictions, eta, plot_path, vmin, vmax) and returns: list