code: def test_input_validation(start_cluster, option: str):
      """Tests input validation for working_dir and py_modules."""
      cluster, address = start_cluster
  
      with pytest.raises(TypeError):
          if option == "working_dir":
              ray.init(address, runtime_env={"working_dir": 10})
          else:
              ray.init(address, runtime_env={"py_modules": [10]})
  
      ray.shutdown()
  
      with pytest.raises(ValueError):
          if option == "working_dir":
              ray.init(
                  address,
                  runtime_env={"working_dir": "/does/not/exist"},
              )
          else:
              ray.init(
                  address,
                  runtime_env={"py_modules": ["/does/not/exist"]},
              )
  
      ray.shutdown()
  
      with pytest.raises(ValueError):
          if option == "working_dir":
              ray.init(
                  address, runtime_env={"working_dir": "does_not_exist"}
              )
          else:
              ray.init(
                  address,
                  runtime_env={"py_modules": ["does_not_exist"]},
              )
  
      ray.shutdown()
  
      for uri in [
          "https://no_dot_zip",
          "s3://no_dot_zip",
          "gs://no_dot_zip",
      ]:
          with pytest.raises(ValueError):
              if option == "working_dir":
                  ray.init(address, runtime_env={"working_dir": uri})
              else:
                  ray.init(address, runtime_env={"py_modules": [uri]})
  
          ray.shutdown()
  
      if option == "py_modules":
          with pytest.raises(TypeError):
              # Must be in a list.
              ray.init(address, runtime_env={"py_modules": "."})
  
imports: import os
  import shutil
  import sys
  import tempfile
  import time
  from importlib import import_module
  from pathlib import Path
  from unittest import mock
  import pytest
  import ray
  from ray._private import gcs_utils
  from ray._private.runtime_env.context import RuntimeEnvContext
  from ray._private.runtime_env.packaging import get_uri_for_directory, upload_package_if_needed
  from ray._private.runtime_env.working_dir import WorkingDirPlugin, set_pythonpath_in_context
  from ray._private.utils import get_directory_size_bytes
label_desc: Use image node_id 6 for calling a global function with example usage: test_input_validation(start_cluster, option) without return types