code: def _build_metrics(self, buffer_size=10, batch_size=None):
      python_metrics = [
          tf_py_metric.TFPyMetric(
              py_metrics.AverageReturnMetric(
                  buffer_size=buffer_size, batch_size=batch_size
              )
          ),
          tf_py_metric.TFPyMetric(
              py_metrics.AverageEpisodeLengthMetric(
                  buffer_size=buffer_size, batch_size=batch_size
              )
          ),
      ]
      if batch_size is None:
          batch_size = 1
      tensorflow_metrics = [
          tf_metrics.AverageReturnMetric(
              buffer_size=buffer_size, batch_size=batch_size
          ),
          tf_metrics.AverageEpisodeLengthMetric(
              buffer_size=buffer_size, batch_size=batch_size
          ),
      ]
  
      return python_metrics, tensorflow_metrics
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from six.moves import range
  from six.moves import zip
  import tensorflow
  from tf_agents.drivers import dynamic_step_driver
  from tf_agents.environments import batched_py_environment
  from tf_agents.environments import random_py_environment
  from tf_agents.environments import tf_py_environment
  from tf_agents.metrics import py_metrics
  from tf_agents.metrics import tf_metrics
  from tf_agents.metrics import tf_py_metric
  from tf_agents.policies import random_tf_policy
  from tf_agents.specs import array_spec
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import time_step
  from tf_agents.utils import test_utils
label_desc: Use image node_id 1 for calling the MetricEqualityTest obj's underlying member method code with example usage: obj._build_metrics(buffer_size, batch_size) and returns: python_metrics,  tensorflow_metrics