code: def testFilterFeat(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)
  
      filter_feat = np.array([1] * 6000 + [None] * 2000)
      filter_arr = np.array([True] * 6000 + [False] * 2000)
  
      for method in ["smaller_data", "larger_data"]:
          result = _MI(
              [fg],
              [fa],
              [True],
              [True],
              filter_feature=filter_arr,
              seed=20,
              estimate_method=method,
          )
          self.assertAlmostEqual(result, np.log2(3), places=2)
  
          result = _MI(
              [fg],
              [fa],
              [False],
              [True],
              filter_feature=filter_arr,
              seed=20,
              estimate_method=method,
          )
          self.assertAlmostEqual(result, np.log2(3), places=2)
  
          result = _MI(
              [fg],
              [filter_feat],
              [False],
              [False],
              seed=23,
              estimate_method=method,
          )
          self.assertAlmostEqual(
              result, (3 / 4) * (np.log2(4 / 3)) + 0.5, places=2
          )
  
          result = _MI(
              [fg],
              [filter_feat],
              [False],
              [False],
              filter_feature=filter_arr,
              seed=23,
              estimate_method=method,
          )
          self.assertLess(abs(result), 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 7 for calling the RanklabMutualInformationTest obj's underlying member method code with example usage: obj.testFilterFeat() without return types