code: def test_average():
      sd_distorted.features[-1, -1] += 1
      sd.instance_weights = sd_distorted.instance_weights = np.array(
          [1, 1, 1, 3]
      )
      sdm = SampleDistortionMetric(sd, sd_distorted)
      assert sdm.average_manhattan_distance() == 3.5
  
file_path: AIF360/tests/test_sample_distortion_metric.py
imports: import numpy
  import pandas
  from scipy.spatial.distance import cdist
  from aif360.datasets import StructuredDataset
  from aif360.metrics import SampleDistortionMetric
label_desc: Use image node_id 5 for calling a global function with example usage: test_average() without return types