code: def task_wildcard_metrics_pattern(
      namespace: MetricNamespaceBase,
      metric_name: MetricNameBase,
      metric_prefix: MetricPrefix = MetricPrefix.DEFAULT,
  ) -> str:
      r"""Get the re (regular expression) pattern to find a set of metrics
      regardless task names. The motivation to have this API is from the past
      bugs which tools hard-code the patterns but the naming change, causing
      some testing issues.
      """
      return rf"{namespace}-.+\|{metric_prefix}{metric_name}"
  
imports: from enum import Enum
  from typing import Optional
label_desc: Use image node_id 1 for calling a global function with example usage: task_wildcard_metrics_pattern(namespace, metric_name, metric_prefix) and returns: namespace, str, metric_prefix, metric_name