code: def test_init_metrics_on_ray(
      ray_start_regular_shared, create_cluster
  ):
      client = create_cluster[0]
      assert client.session
      from ....metrics import api
  
      assert (
          client._cluster._config.get("metrics", {}).get("backend")
          == "ray"
      )
      assert api._metric_backend == "ray"
  
      client.session.stop_server()
  
imports: import asyncio
  import copy
  import operator
  import os
  from functools import reduce
  import numpy
  import pytest
  from ....None import tensor
  from ....None import dataframe
  from ....learn.contrib.lightgbm.tests import test_classifier
  from ....oscar.errors import ReconstructWorkerError
  from ....session import get_default_session, new_session
  from ....tests.core import require_ray, mock, DICT_NOT_EMPTY
  from ....utils import lazy_import
  from ..ray import _load_config, ClusterStateActor, new_cluster
  from ..tests import test_local
  from .modules.utils import cleanup_third_party_modules_output, get_output_filenames
label_desc: Use image node_id 5 for calling a global function with example usage: test_init_metrics_on_ray(ray_start_regular_shared, create_cluster) without return types