code: def _load_env(
      domain_name: Text,
      task_name: Text,
      task_kwargs=None,
      environment_kwargs=None,
      visualize_reward: bool = False,
  ):
      """Loads a DM environment.
  
      Args:
        domain_name: A string containing the name of a domain.
        task_name: A string containing the name of a task.
        task_kwargs: Optional `dict` of keyword arguments for the task.
        environment_kwargs: Optional `dict` specifying keyword arguments for the
          environment.
        visualize_reward: Optional `bool`. If `True`, object colours in rendered
          frames are set to indicate the reward at each step. Default `False`.
  
      Returns:
        The requested environment.
  
      Raises:
        ImportError: if dm_control module was not available.
      """
  
      if not is_available():
          raise ImportError("dm_control module is not available.")
      return suite.load(
          domain_name,
          task_name,
          task_kwargs=task_kwargs,
          environment_kwargs=environment_kwargs,
          visualize_reward=visualize_reward,
      )
  
file_path: agents/tf_agents/environments/suite_dm_control.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Any, Callable, Sequence, TYPE_CHECKING, Text
  import gin
  from tf_agents.environments import dm_control_wrapper
  from tf_agents.environments import py_environment
  from tf_agents.typing import types
label_desc: Use image node_id 2 for calling a global function with example usage: _load_env(domain_name, task_name, task_kwargs, environment_kwargs, visualize_reward) and returns: suite