class_docstr: Runner for evaluating using a fixed number of episodes rather than steps.
  
  Also restricts data collection to a strict cap,
  following conventions in data-efficient RL research.
class_docstr_tok: ["Runner","for","evaluating","using","a","fixed","number","of","episodes","rather","than","steps",".","Also","restricts","data","collection","to","a","strict","cap",",","following","conventions","in","data-efficient","RL","research","."]
code: def _maybe_save_single_summary(
      self, iteration, ep_return, length, save_if_eval=False
  ):
      prefix = "Train/" if not self._agent.eval_mode else "Eval/"
      if not self._agent.eval_mode or save_if_eval:
          with self._summary_writer.as_default():
              tf.summary.scalar(
                  prefix + "EpisodeLength", length, step=iteration
              )
              tf.summary.scalar(
                  prefix + "EpisodeReturn", ep_return, step=iteration
              )
              if self.log_normalized_scores:
                  normalized_score = (
                      normalization_utils.normalize_score(
                          ep_return, self.game_name
                      )
                  )
                  tf.summary.scalar(
                      prefix + "EpisodeNormalizedScore",
                      normalized_score,
                      step=iteration,
                  )
  
imports: import functools
  import os
  import sys
  import time
  from absl import logging
  from dopamine.discrete_domains import atari_lib
  from dopamine.discrete_domains import iteration_statistics
  from dopamine.discrete_domains import run_experiment
  from dopamine.labs.atari_100k import normalization_utils
  from dopamine.metrics import collector_dispatcher
  from dopamine.metrics import statistics_instance
  import gin
  import jax
  import numpy
  import tensorflow
label_desc: Use image node_id 8 for calling the DataEfficientAtariRunner obj's underlying member method code with example usage: obj._maybe_save_single_summary(iteration, ep_return, length, save_if_eval) without return types