class_docstr: Object that is responsible for evaluating a given agent.
  
  Args:
      agent (Agent): Agent to evaluate.
      env (Env): Env to evaluate the agent on.
      n_steps (int): Number of timesteps used in each evaluation.
      n_episodes (int): Number of episodes used in each evaluation.
      eval_interval (int): Interval of evaluations in steps.
      outdir (str): Path to a directory to save things.
      max_episode_len (int): Maximum length of episodes used in evaluations.
      step_offset (int): Offset of steps used to schedule evaluations.
      evaluation_hooks (Sequence): Sequence of
          pfrl.experiments.evaluation_hooks.EvaluationHook objects. They are
          called after each evaluation.
      save_best_so_far_agent (bool): If set to True, after each evaluation,
          if the score (= mean of returns in evaluation episodes) exceeds
          the best-so-far score, the current agent is saved.
      use_tensorboard (bool): Additionally log eval stats to tensorboard
code: def evaluate_and_update_max_score(self, t, episodes):
      self.env_clear_stats()
      eval_stats = eval_performance(
          self.env,
          self.agent,
          self.n_steps,
          self.n_episodes,
          max_episode_len=self.max_episode_len,
          logger=self.logger,
      )
      elapsed = time.time() - self.start_time
      agent_stats = self.agent.get_statistics()
      custom_values = tuple(tup[1] for tup in agent_stats)
      env_stats = self.env_get_stats()
      custom_env_values = tuple(tup[1] for tup in env_stats)
      mean = eval_stats["mean"]
      values = (
          (
              t,
              episodes,
              elapsed,
              mean,
              eval_stats["median"],
              eval_stats["stdev"],
              eval_stats["max"],
              eval_stats["min"],
          )
          + custom_values
          + custom_env_values
      )
      record_stats(self.outdir, values)
  
      if self.use_tensorboard:
          record_tb_stats(
              self.tb_writer, agent_stats, eval_stats, env_stats, t
          )
  
      for hook in self.evaluation_hooks:
          hook(
              env=self.env,
              agent=self.agent,
              evaluator=self,
              step=t,
              eval_stats=eval_stats,
              agent_stats=agent_stats,
              env_stats=env_stats,
          )
  
      if mean > self.max_score:
          self.logger.info(
              "The best score is updated %s -> %s", self.max_score, mean
          )
          self.max_score = mean
          if self.save_best_so_far_agent:
              save_agent(self.agent, "best", self.outdir, self.logger)
      return mean
  
imports: import logging
  import multiprocessing
  import os
  import statistics
  import time
  import numpy
  import pfrl
label_desc: Use image node_id 2 for calling the Evaluator obj's underlying member method code with example usage: obj.evaluate_and_update_max_score(t, episodes) and returns: mean