code: def _call_on_episode_start(
      episode, env_id, callbacks, worker, base_env
  ):
      # Call each policy's Exploration.on_episode_start method.
      # Note: This may break the exploration (e.g. ParameterNoise) of
      # policies in the `policy_map` that have not been recently used
      # (and are therefore stashed to disk). However, we certainly do not
      # want to loop through all (even stashed) policies here as that
      # would counter the purpose of the LRU policy caching.
      for p in worker.policy_map.cache.values():
          if getattr(p, "exploration", None) is not None:
              p.exploration.on_episode_start(
                  policy=p,
                  environment=base_env,
                  episode=episode,
                  tf_sess=p.get_session(),
              )
      callbacks.on_episode_start(
          worker=worker,
          base_env=base_env,
          policies=worker.policy_map,
          episode=episode,
          env_index=env_id,
      )
      episode.started = True
  
imports: import logging
  import queue
  import time
  from abc import ABCMeta, abstractmethod
  from collections import defaultdict, namedtuple
  from typing import TYPE_CHECKING, Any, Callable, Dict, Iterator, List, Optional, Set, Tuple, Type, Union
  import numpy
  import tree
  from ray.rllib.env.base_env import ASYNC_RESET_RETURN, BaseEnv, convert_to_base_env
  from ray.rllib.evaluation.collectors.sample_collector import SampleCollector
  from ray.rllib.evaluation.collectors.simple_list_collector import SimpleListCollector
  from ray.rllib.evaluation.env_runner_v2 import EnvRunnerV2, _fetch_atari_metrics, _get_or_raise, _PerfStats
  from ray.rllib.evaluation.episode import Episode
  from ray.rllib.evaluation.metrics import RolloutMetrics
  from ray.rllib.offline import InputReader
  from ray.rllib.policy.policy import Policy
  from ray.rllib.policy.policy_map import PolicyMap
  from ray.rllib.policy.sample_batch import SampleBatch, concat_samples
  from ray.rllib.utils.annotations import DeveloperAPI, override
  from ray.rllib.utils.debug import summarize
  from ray.rllib.utils.deprecation import deprecation_warning, DEPRECATED_VALUE
  from ray.rllib.utils.framework import try_import_tf
  from ray.rllib.utils.numpy import convert_to_numpy, make_action_immutable
  from ray.rllib.utils.spaces.space_utils import clip_action, unbatch, unsquash_action
  from ray.rllib.utils.typing import AgentID, EnvActionType, EnvID, EnvInfoDict, EnvObsType, MultiEnvDict, PolicyID, SampleBatchType, TensorStructType
  from ray.util.debug import log_once
label_desc: Use image node_id 6 for calling a global function with example usage: _call_on_episode_start(episode, env_id, callbacks, worker, base_env) without return types