code: def test_episode_and_sample_callbacks(self):
      config = (
          PPOConfig()
          .environment("CartPole-v1")
          .rollouts(num_rollout_workers=0)
          .callbacks(EpisodeAndSampleCallbacks)
          .training(
              train_batch_size=50, sgd_minibatch_size=50, num_sgd_iter=1
          )
      )
      for _ in framework_iterator(config, frameworks=("tf", "torch")):
          algo = config.build()
          algo.train()
          algo.train()
          callback_obj = algo.workers.local_worker().callbacks
          self.assertGreater(callback_obj.counts["sample"], 0)
          self.assertGreater(callback_obj.counts["start"], 0)
          self.assertGreater(callback_obj.counts["end"], 0)
          self.assertGreater(callback_obj.counts["step"], 0)
          algo.stop()
  
imports: from collections import Counter
  import unittest
  import ray
  from ray.rllib.algorithms.callbacks import DefaultCallbacks, make_multi_callbacks
  import ray.rllib.algorithms.dqn
  from ray.rllib.algorithms.ppo import PPOConfig
  from ray.rllib.evaluation.episode import Episode
  from ray.rllib.examples.env.random_env import RandomEnv
  from ray.rllib.utils.test_utils import framework_iterator
label_desc: Use image node_id 3 for calling the TestCallbacks obj's underlying member method code with example usage: obj.test_episode_and_sample_callbacks() without return types