code: def _value_error(self, value_fn):
      errors = []
      for _ in range(10):
          batch = next(self._trajectory_batch_stream)
          values = value_fn(batch)
          errors.append(np.mean((values - batch.return_) ** 2))
      return np.mean(errors)
  
file_path: trax/trax/rl/value_tasks_test.py
imports: from absl.testing import absltest
  import numpy
  from trax import layers
  from trax import models
  from trax import optimizers
  from trax.rl import advantages
  from trax.rl import distributions
  from trax.rl import policy_tasks
  from trax.rl import task
  from trax.rl import value_tasks
  from trax.supervised import lr_schedules
  from trax.supervised import training
label_desc: Use image node_id 2 for calling the ValueTasksTest obj's underlying member method code with example usage: obj._value_error(value_fn) and returns: np