code: def callback(lcl, _glb):
      """
      The callback function for logging and saving
  
      :param lcl: (dict) the local variables
      :param _glb: (dict) the global variables
      :return: (bool) is solved
      """
      # stop training if reward exceeds 199
      if len(lcl["episode_rewards"][-101:-1]) == 0:
          mean_100ep_reward = -np.inf
      else:
          mean_100ep_reward = round(
              float(np.mean(lcl["episode_rewards"][-101:-1])), 1
          )
      is_solved = (
          lcl["self"].num_timesteps > 100 and mean_100ep_reward >= 199
      )
      return not is_solved
  
imports: import argparse
  import gym
  import numpy
  from stable_baselines.deepq import DQN, MlpPolicy
label_desc: Use image node_id 1 for calling a global function with example usage: callback(lcl, _glb) and returns: unknown