code: def _validate_rlds_step_spec(
      rlds_step_spec: tf.data.Dataset.element_spec,
  ) -> None:
      """Validates the RLDS step spec.
  
      Validates that rlds_step_spec is correct spec for RLDS steps.
  
      Args:
        rlds_step_spec: An element spec to be validated as correct RLDS steps spec.
  
      Raises:
        ValueError: If RLDS step spec is not valid.
      """
      rlds_step_features = get_rlds_step_features()
      if not all(item in rlds_step_spec for item in rlds_step_features):
          raise ValueError(
              "Invalid RLDS step spec. Features expected "
              f"are {rlds_step_features}, but found {list(rlds_step_spec.keys())}"
          )
  
file_path: agents/tf_agents/replay_buffers/rlds_to_reverb.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Callable, Dict, List, Optional, Tuple, Union
  from absl import logging
  import numpy
  import rlds
  import tensorflow
  from tf_agents.replay_buffers import reverb_utils
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import policy_step
  from tf_agents.trajectories import time_step
  from tf_agents.trajectories import trajectory
label_desc: Use image node_id 3 for calling a global function with example usage: _validate_rlds_step_spec(rlds_step_spec) without return types