class_docstr: Test methods common to Public and Private data interfaces modules.
code: def test_get_valid_mads(self):
      # public data
      for normalized in [True, False]:
          mads = self.d[0].get_valid_mads(
              normalized=normalized,
              display_warnings=False,
              return_mads=True,
          )
          # mads denotes variability in features and should be positive for DiCE.
          assert all(mads[feature] > 0 for feature in mads)
  
          if normalized:
              min_value = 0
              max_value = 1
  
          errors = 0
          for feature in mads:
              if not normalized:
                  min_value = self.d[0].data_df[feature].min()
                  max_value = self.d[0].data_df[feature].max()
  
              if mads[feature] > max_value - min_value:
                  errors += 1
          assert (
              errors == 0
          )  # mads can't be larger than the feature range
  
      # private data
      for normalized in [True, False]:
          mads = self.d[1].get_valid_mads(
              normalized=normalized,
              display_warnings=False,
              return_mads=True,
          )
          # no mad is provided for private data by default, so a practical alternative is keeping all value at 1.
          # Check get_valid_mads() in data interface classes for more info.
          assert all(mads[feature] == 1 for feature in mads)
  
file_path: DiCE/tests/test_data.py
imports: import pytest
  import dice_ml
label_desc: Use image node_id 2 for calling the TestCommonDataMethods obj's underlying member method code with example usage: obj.test_get_valid_mads() without return types