code: def evaluate_all_epochs(
      loop_hparams,
      planner_hparams,
      policy_dir,
      model_dir,
      eval_metrics_dir,
      *args,
      **kwargs,
  ):
      epoch_policy_dirs = tf.gfile.Glob(
          os.path.join(policy_dir, "epoch_*")
      )
      for epoch_policy_dir in epoch_policy_dirs:
          epoch_metrics_dir = os.path.join(
              eval_metrics_dir,
              "epoch_{}".format(epoch_policy_dir.split("_")[-1]),
          )
          evaluate(
              loop_hparams,
              planner_hparams,
              epoch_policy_dir,
              model_dir,
              epoch_metrics_dir,
              *args,
              **kwargs,
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import datetime
  import os
  from tensor2tensor.data_generators import gym_env
  from tensor2tensor.layers import common_video
  from tensor2tensor.models.research import rl
  from tensor2tensor.rl import rl_utils
  from tensor2tensor.rl import trainer_model_based_params
  from tensor2tensor.utils import flags
  from tensor2tensor.utils import hparam
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import trainer_lib
  import tensorflow.compat.v1
label_desc: Use image node_id 22 for calling a global function with example usage: evaluate_all_epochs(loop_hparams, planner_hparams, policy_dir, model_dir, eval_metrics_dir) without return types