class_docstr: The schema file specifies information about what metrics we want to specify,
  but it doesn't specify full `MetricName`s.  Instead, it specifies enough
  information in a `MetricNameMatcher` to pull out the relevant
  `MetricName`s.
code: def matches(self, metric_name: MetricName) -> bool:
      if self.name != metric_name.name:
          return False
  
      if self.split != metric_name.split:
          return False
  
      # Optional
      if (
          self.sub_split is not None
          and self.sub_split != metric_name.sub_split
      ):
          return False
  
      metric_perturbation_name = (
          metric_name.perturbation and metric_name.perturbation.name
      )
      if self.perturbation_name != metric_perturbation_name:
          return False
  
      # If there is a perturbation, only return the worst
      if (
          metric_name.perturbation
          and metric_name.perturbation.computed_on != PERTURBATION_WORST
      ):
          return False
  
      return True
  
imports: from dataclasses import dataclass, field
  from datetime import date
  from typing import List, Optional, Dict
  import dacite
  import mako.template
  import yaml
  import importlib_resources
  from helm.common.general import hlog
  from helm.benchmark.metrics.metric_name import MetricName
  from helm.benchmark.augmentations.perturbation_description import PERTURBATION_WORST
label_desc: Use image node_id 1 for calling the MetricNameMatcher obj's underlying member method code with example usage: obj.matches(metric_name) and returns: True, False, False, False, False, False