class_docstr: Abstract base class for RLlib callbacks (similar to Keras callbacks).
  
  These callbacks can be used for custom metrics and custom postprocessing.
  
  By default, all of these callbacks are no-ops. To configure custom training
  callbacks, subclass DefaultCallbacks and then set
  {"callbacks": YourCallbacksClass} in the algo config.
class_docstr_tok: ["Abstract","base","class","for","RLlib","callbacks","(","similar","to","Keras","callbacks",")",".","These","callbacks","can","be","used","for","custom","metrics","and","custom","postprocessing",".","By","default",",","all","of","these","callbacks","are","no-ops",".","To","configure","custom","training","callbacks",",","subclass","DefaultCallbacks","and","then","set","{","``","callbacks","''",":","YourCallbacksClass","}","in","the","algo","config","."]
docstr: Callback run when a new sub-environment has been created.
  
  This method gets called after each sub-environment (usually a
  gym.Env) has been created, validated (RLlib built-in validation
  + possible custom validation function implemented by overriding
  `Algorithm.validate_env()`), wrapped (e.g. video-wrapper), and seeded.
  
  Args:
      worker: Reference to the current rollout worker.
      sub_environment: The sub-environment instance that has been
          created. This is usually a gym.Env object.
      env_context: The `EnvContext` object that has been passed to
          the env's constructor.
      env_index: The index of the sub-environment that has been created
          (within the vector of sub-environments of the BaseEnv).
      kwargs: Forward compatibility placeholder.
docstr_tok: ["Callback","run","when","a","new","sub-environment","has","been","created",".","This","method","gets","called","after","each","sub-environment","(","usually","a","gym.Env",")","has","been","created",",","validated","(","RLlib","built-in","validation","+","possible","custom","validation","function","implemented","by","overriding","`","Algorithm.validate_env","(",")","`",")",",","wrapped","(","e.g",".","video-wrapper",")",",","and","seeded",".","Args",":","worker",":","Reference","to","the","current","rollout","worker",".","sub_environment",":","The","sub-environment","instance","that","has","been","created",".","This","is","usually","a","gym.Env","object",".","env_context",":","The","`","EnvContext","`","object","that","has","been","passed","to","the","env","'s","constructor",".","env_index",":","The","index","of","the","sub-environment","that","has","been","created","(","within","the","vector","of","sub-environments","of","the","BaseEnv",")",".","kwargs",":","Forward","compatibility","placeholder","."]
code: def on_sub_environment_created(
      self,
      *,
      worker: "EnvRunner",
      sub_environment: EnvType,
      env_context: EnvContext,
      env_index: Optional[int] = None,
      **kwargs,
  ) -> None:
      """Callback run when a new sub-environment has been created.
  
      This method gets called after each sub-environment (usually a
      gym.Env) has been created, validated (RLlib built-in validation
      + possible custom validation function implemented by overriding
      `Algorithm.validate_env()`), wrapped (e.g. video-wrapper), and seeded.
  
      Args:
          worker: Reference to the current rollout worker.
          sub_environment: The sub-environment instance that has been
              created. This is usually a gym.Env object.
          env_context: The `EnvContext` object that has been passed to
              the env's constructor.
          env_index: The index of the sub-environment that has been created
              (within the vector of sub-environments of the BaseEnv).
          kwargs: Forward compatibility placeholder.
      """
      pass
  
imports: import gc
  import os
  import platform
  import tracemalloc
  from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, Type, Union
  import gymnasium
  import numpy
  from ray.rllib.core.rl_module.rl_module import RLModule
  from ray.rllib.env.base_env import BaseEnv
  from ray.rllib.env.env_context import EnvContext
  from ray.rllib.evaluation.episode import Episode
  from ray.rllib.evaluation.episode_v2 import EpisodeV2
  from ray.rllib.evaluation.postprocessing import Postprocessing
  from ray.rllib.policy import Policy
  from ray.rllib.policy.sample_batch import SampleBatch
  from ray.rllib.utils.annotations import override, OverrideToImplementCustomLogic, PublicAPI
  from ray.rllib.utils.deprecation import deprecation_warning
  from ray.rllib.utils.exploration.random_encoder import _MovingMeanStd, compute_states_entropy, update_beta
  from ray.rllib.utils.typing import AgentID, EnvType, EpisodeType, PolicyID
  from ray.tune.callback import _CallbackMeta
  import psutil
label_desc: Use image node_id 7 for calling the DefaultCallbacks obj's underlying member method code with example usage: obj.on_sub_environment_created() without return types