code: def getExpectedGrad(self, dist, a, b, params, samples, mu, z_prior):
      l_1, l_2 = params
  
      t, c_1, c_2 = self.getValueForX(
          dist, a, b, params, z_prior, samples, return_cs=True
      )
  
      t1 = t * c_1 / np.sqrt(t**2 + mu**2)
      t2 = t * c_2 / np.sqrt(t**2 + mu**2)
  
      exp1 = np.mean(t1)
      exp2 = np.mean(t2)
      dl1 = (
          exp1
          - b
          + (b - a) / 2
          + (b - a) * l_1 / (2 * np.sqrt(l_1**2 + mu**2))
      )
      dl2 = (
          exp2
          - b
          + (b - a) / 2
          + (b - a) * l_2 / (2 * np.sqrt(l_2**2 + mu**2))
      )
      return dl1, dl2
  
file_path: AIF360/aif360/algorithms/inprocessing/celisMeta/StatisticalRate.py
imports: import numpy
  from aif360.algorithms.inprocessing.celisMeta.General import General
label_desc: Use image node_id 1 for calling the StatisticalRate obj's underlying member method code with example usage: obj.getExpectedGrad(dist, a, b, params, samples, mu, z_prior) and returns: dl1,  dl2