code: def has_metric_tagged_with_value(addr, tag, value) -> bool:
      metrics = raw_metrics(addr)
      for name, samples in metrics.items():
          for sample in samples:
              if (
                  tag in set(sample.labels.values())
                  and sample.value == value
              ):
                  return True
      return False
  
imports: from math import ceil
  import sys
  import time
  import pytest
  import ray
  from ray._private import ray_constants
  import ray._private.gcs_utils
  from ray._private.test_utils import wait_for_condition, raw_metrics
  import numpy
  from ray._private.utils import get_system_memory
  from ray._private.utils import get_used_memory
  from ray._private.state_api_test_utils import verify_failed_task
  from ray.util.state.state_manager import StateDataSourceClient
label_desc: Use image node_id 6 for calling a global function with example usage: has_metric_tagged_with_value(addr, tag, value) and returns: False, True