code: def test_task_wildcard_metric_pattern(self) -> None:
      pattern = task_wildcard_metrics_pattern(
          MetricNamespace.THROUGHPUT,
          MetricName.THROUGHPUT,
          MetricPrefix.LIFETIME,
      )
      key1 = compose_metric_key(
          MetricNamespace.THROUGHPUT,
          "t1",
          MetricName.THROUGHPUT,
          MetricPrefix.LIFETIME,
      )
      key2 = compose_metric_key(
          MetricNamespace.THROUGHPUT,
          "t2",
          MetricName.THROUGHPUT,
          MetricPrefix.LIFETIME,
      )
      key3 = compose_metric_key(
          MetricNamespace.THROUGHPUT,
          "t3",
          MetricName.THROUGHPUT,
          MetricPrefix.WINDOW,
      )
      self.assertTrue(re.search(pattern, key1))
      self.assertTrue(re.search(pattern, key2))
      self.assertFalse(re.search(pattern, key3))
  
imports: import re
  import unittest
  from torchrec.metrics.metrics_namespace import compose_metric_key, MetricName, MetricNamespace, MetricPrefix, task_wildcard_metrics_pattern
label_desc: Use image node_id 3 for calling the MetricNamespaceTest obj's underlying member method code with example usage: obj.test_task_wildcard_metric_pattern() without return types