docs: public IncludeExcludePatterns metricToPatterns(String metric) {
      IncludeExcludePatterns foundPatterns = metricNameToPatterns.get(metric);
      if (foundPatterns != null) {
          return foundPatterns;
      }
  
      // Since the keys in the prototype can be regular expressions,
      // need to look at all of them and can potentially match multiple,
      // each having a different set of rules.
      foundPatterns = new IncludeExcludePatterns();
      for (MeterFilterPattern meterPattern : includePatterns) {
        if (meterPattern.namePattern.matcher(metric).matches()) {
          foundPatterns.include.addAll(meterPattern.values);
        }
      }
      for (MeterFilterPattern meterPattern : excludePatterns) {
        if (meterPattern.namePattern.matcher(metric).matches()) {
          foundPatterns.exclude.addAll(meterPattern.values);
        }
      }
      metricNameToPatterns.put(metric, foundPatterns);
      return foundPatterns;
    }