code: def testWeightFeat(self):
      np.random.seed(3)
      fa = np.array(
          ["cat0"] * 2000
          + ["cat1"] * 2000
          + ["cat2"] * 2000
          + ["cat3"] * 2000
      )  # 4 categories
      fg = np.array([1] * 2000 + [2] * 2000 + [3] * 2000 + [4] * 2000)
  
      weight_feat = np.array(
          [1] * 2000 + [0.5] * 2000 + [0.25] * 2000 + [0] * 2000
      )
  
      for method in ["smaller_data", "larger_data"]:
          result = _MI(
              [fg],
              [fa],
              [True],
              [True],
              weight_feature=weight_feat,
              seed=20,
              estimate_method=method,
          )
          self.assertAlmostEqual(result, 7 / 8, delta=1e-2)
  
          result = _MI(
              [fg],
              [weight_feat],
              [False],
              [False],
              weight_feature=weight_feat,
              seed=23,
              estimate_method=method,
          )
          self.assertAlmostEqual(result, 7 / 8, delta=1e-2)
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  from tensorflow_data_validation.utils import mutual_information_util
label_desc: Use image node_id 8 for calling the RanklabMutualInformationTest obj's underlying member method code with example usage: obj.testWeightFeat() without return types