class_docstr: Base class for triggering callback on event.
  
  :param callback: (Optional[BaseCallback]) Callback that will be called
      when an event is triggered.
  :param verbose: (int)
class_docstr_tok: ["Base","class","for","triggering","callback","on","event",".",":","param","callback",":","(","Optional","[","BaseCallback","]",")","Callback","that","will","be","called","when","an","event","is","triggered",".",":","param","verbose",":","(","int",")"]
code: def __init__(
      self, callback: Optional[BaseCallback] = None, verbose: int = 0
  ):
      super(EventCallback, self).__init__(verbose=verbose)
      self.callback = callback
      # Give access to the parent
      if callback is not None:
          self.callback.parent = self
  
imports: import os
  from abc import ABC
  import warnings
  import typing
  from typing import Union, List, Dict, Any, Optional
  import gym
  import numpy
  from stable_baselines.common.vec_env import VecEnv, sync_envs_normalization, DummyVecEnv
  from stable_baselines.common.evaluation import evaluate_policy
  from stable_baselines import logger
label_desc: Use image node_id 1 to create a new EventCallback object from inherited base classes: BaseCallback with example: obj = EventCallback(callback, verbose)