code: def _add_group(
      self, name: str, metric_group_type: MetricGroupType
  ) -> "GenericMetricGroup":
      for group in self._sub_groups:
          if (
              name == group._name
              and metric_group_type == group._metric_group_type
          ):
              # we don't create same metric group repeatedly
              return group
  
      sub_group = GenericMetricGroup(self, name, metric_group_type)
      self._sub_groups.append(sub_group)
      return sub_group
  
imports: import json
  from enum import Enum
  from typing import Callable, List, Tuple
  from pyflink.fn_execution.metrics.process.counter_impl import CounterImpl
  from pyflink.fn_execution.metrics.process.distribution_impl import DistributionImpl
  from pyflink.fn_execution.metrics.process.meter_impl import MeterImpl
  from pyflink.metrics import MetricGroup, Counter, Distribution, Meter
label_desc: Use image node_id 7 for calling the GenericMetricGroup obj's underlying member method code with example usage: obj._add_group(name, metric_group_type) and returns: sub_group, group