code: def test_task_actor_conda_env(conda_envs, shutdown_only):
      ray.init()
  
      # Basic conda runtime env
      for package_version in EMOJI_VERSIONS:
          runtime_env = {"conda": f"package-{package_version}"}
  
          task = get_emoji_version.options(runtime_env=runtime_env)
          assert ray.get(task.remote()) == package_version
  
          actor = VersionActor.options(runtime_env=runtime_env).remote()
          assert (
              ray.get(actor.get_emoji_version.remote())
              == package_version
          )
  
      # Runtime env should inherit to nested task
      @ray.remote
      def wrapped_version():
          return ray.get(get_emoji_version.remote())
  
      @ray.remote
      class Wrapper:
          def wrapped_version(self):
              return ray.get(get_emoji_version.remote())
  
      for package_version in EMOJI_VERSIONS:
          runtime_env = {"conda": f"package-{package_version}"}
  
          task = wrapped_version.options(runtime_env=runtime_env)
          assert ray.get(task.remote()) == package_version
  
          actor = Wrapper.options(runtime_env=runtime_env).remote()
          assert (
              ray.get(actor.wrapped_version.remote()) == package_version
          )
  
imports: import os
  import platform
  from pathlib import Path
  import pytest
  import subprocess
  import sys
  import tempfile
  import time
  from typing import List
  from unittest import mock
  import yaml
  import ray
  from ray.runtime_env import RuntimeEnv
  from ray._private.runtime_env.conda import inject_dependencies, _inject_ray_to_conda_site, _resolve_install_from_source_ray_dependencies, _current_py_version
  from ray._private.runtime_env.conda_utils import get_conda_env_list
  from ray._private.test_utils import run_string_as_driver, run_string_as_driver_nonblocking, wait_for_condition, chdir
  from ray._private.utils import get_conda_env_dir, get_conda_bin_executable, try_to_create_directory
label_desc: Use image node_id 4 for calling a global function with example usage: test_task_actor_conda_env(conda_envs, shutdown_only) and returns: ray, ray