code: def test_compose_metric_key(self) -> None:
      self.assertEqual(
          compose_metric_key(
              MetricNamespace.THROUGHPUT,
              self.task,
              MetricName.THROUGHPUT,
              MetricPrefix.LIFETIME,
          ),
          f"throughput-{self.task}|lifetime_throughput",
      )
      self.assertEqual(
          compose_metric_key(
              MetricNamespace.THROUGHPUT,
              self.task,
              MetricName.THROUGHPUT,
              MetricPrefix.WINDOW,
          ),
          f"throughput-{self.task}|window_throughput",
      )
      self.assertEqual(
          compose_metric_key(
              MetricNamespace.THROUGHPUT,
              self.task,
              MetricName.THROUGHPUT,
          ),
          f"throughput-{self.task}|throughput",
      )
  
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 2 for calling the MetricNamespaceTest obj's underlying member method code with example usage: obj.test_compose_metric_key() without return types