code: def setup_tests(request):
      if "distributed" not in request.keywords:
          # Only run this patch if we're running distributed tests, otherwise Ray will not be installed
          # and this will fail.
          # See: https://stackoverflow.com/a/38763328
          yield
          return
  
      with mock.patch(
          "ludwig.backend.ray.init_ray_local"
      ) as mock_init_ray_local:
          mock_init_ray_local.side_effect = RuntimeError(
              "Ray must be initialized explicitly when running tests"
          )
          yield mock_init_ray_local
  
imports: import contextlib
  import os
  import tempfile
  import time
  import uuid
  from unittest import mock
  import pytest
  from ludwig.constants import BATCH_SIZE, COMBINER, EPOCHS, HYPEROPT, INPUT_FEATURES, NAME, OUTPUT_FEATURES, TRAINER, TYPE
  from ludwig.hyperopt.run import hyperopt
  from tests.integration_tests.utils import category_feature, generate_data, text_feature
label_desc: Use image node_id 4 for calling a global function with example usage: setup_tests(request) without return types