code: def test_workload_placement_metrics(ray_start_regular):
      @ray.remote(num_cpus=1)
      def task():
          pass
  
      @ray.remote(num_cpus=1)
      class Actor:
          def ready(self):
              return True
  
      t = task.remote()
      ray.get(t)
      a = Actor.remote()
      ray.get(a.ready.remote())
      del a
      pg = placement_group(bundles=[{"CPU": 1}], strategy="SPREAD")
      ray.get(pg.ready())
  
      placement_metric_condition = get_metric_check_condition(
          [
              MetricSamplePattern(
                  name="ray_scheduler_placement_time_s_bucket",
                  value=1.0,
                  partial_label_match={"WorkloadType": "Actor"},
              ),
              MetricSamplePattern(
                  name="ray_scheduler_placement_time_s_bucket",
                  value=1.0,
                  partial_label_match={"WorkloadType": "Task"},
              ),
              MetricSamplePattern(
                  name="ray_scheduler_placement_time_s_bucket",
                  value=1.0,
                  partial_label_match={
                      "WorkloadType": "PlacementGroup"
                  },
              ),
          ],
      )
      wait_for_condition(placement_metric_condition, timeout=60)
  
imports: import os
  import platform
  import sys
  import time
  import numpy
  import pytest
  import ray
  import ray._private.gcs_utils
  import ray.experimental.internal_kv
  from ray._private.test_utils import make_global_state_accessor, wait_for_condition, get_metric_check_condition, MetricSamplePattern
  from ray.util.client.ray_client_helpers import connect_to_client_or_not
  from ray.util.placement_group import placement_group
  from ray.util.scheduling_strategies import NodeAffinitySchedulingStrategy, PlacementGroupSchedulingStrategy
  from ray._private.test_utils import SignalActor
label_desc: Use image node_id 12 for calling a global function with example usage: test_workload_placement_metrics(ray_start_regular) and returns: True