code: def test_inter_distinct(self):
      # 3 n-grams, all appearing once
      m = InterDistinctMetric.compute("this is some test", 2)
      self.assertAlmostEqual(m, 1.0)
      # 3-grams, each appearing twice
      self.assertAlmostEqual(m + m, 0.5)
  
imports: import unittest
  from typing import Dict
  import torch
  import random
  from parlai.core.metrics import AverageMetric, SumMetric, FixedMetric, Metrics, GlobalAverageMetric, MacroAverageMetric, TimerMetric, aggregate_unnamed_reports, aggregate_named_reports, InterDistinctMetric, IntraDistinctMetric, FairseqBleuMetric
  from parlai.core.torch_classifier_agent import ConfusionMatrixMetric, WeightedF1Metric, AUCMetrics
  from parlai.core.torch_generator_agent import PPLMetric
  import parlai.utils.testing
label_desc: Use image node_id 1 for calling the TestDistinct obj's underlying member method code with example usage: obj.test_inter_distinct() without return types