code: def test(self):
      random_action_func_count = [0]
      greedy_action_func_count = [0]
  
      def random_action_func():
          random_action_func_count[0] += 1
          return 0
  
      def greedy_action_func():
          greedy_action_func_count[0] += 1
          return 0
  
      explorer = epsilon_greedy.ExponentialDecayEpsilonGreedy(
          self.start_epsilon,
          self.end_epsilon,
          self.decay,
          random_action_func,
      )
  
      explorer.logger.addHandler(logging.StreamHandler())
      explorer.logger.setLevel(logging.DEBUG)
  
      assert pytest.approx(explorer.epsilon) == self.start_epsilon
  
      for t in range(self.steps):
          explorer.select_action(t, greedy_action_func)
  
      assert (
          random_action_func_count[0] + greedy_action_func_count[0]
          == self.steps
      )
  
      expected = max(
          self.start_epsilon * (self.decay ** (self.steps - 1)),
          self.end_epsilon,
      )
      assert pytest.approx(explorer.epsilon) == expected
  
file_path: pfrl/tests/explorers_tests/test_epsilon_greedy.py
imports: import logging
  import pytest
  from pfrl.explorers import epsilon_greedy
label_desc: Use image node_id 2 for calling the TestExponentialDecayEpsilonGreedy obj's underlying member method code with example usage: obj.test() and returns: int, int