class_docstr: A replay buffer that stores and can sample whole episodes.
  
  This buffer only stores valid steps, and doesn't require paths to
  have a maximum length.
  
  Args:
      capacity_in_transitions (int): Total memory allocated for the buffer.
      env_spec (EnvSpec): Environment specification.
class_docstr_tok: ["A","replay","buffer","that","stores","and","can","sample","whole","episodes",".","This","buffer","only","stores","valid","steps",",","and","does","n't","require","paths","to","have","a","maximum","length",".","Args",":","capacity_in_transitions","(","int",")",":","Total","memory","allocated","for","the","buffer",".","env_spec","(","EnvSpec",")",":","Environment","specification","."]
docstr: Get path length.
  
  Args:
      path (dict): Path.
  
  Returns:
      length: Path length.
  
  Raises:
      ValueError: If path is empty or has inconsistent lengths.
docstr_tok: ["Get","path","length",".","Args",":","path","(","dict",")",":","Path",".","Returns",":","length",":","Path","length",".","Raises",":","ValueError",":","If","path","is","empty","or","has","inconsistent","lengths","."]
code: def _get_path_length(path):
      """Get path length.
  
      Args:
          path (dict): Path.
  
      Returns:
          length: Path length.
  
      Raises:
          ValueError: If path is empty or has inconsistent lengths.
  
      """
      length_key = None
      length = None
      for key, value in path.items():
          if length is None:
              length = len(value)
              length_key = key
          elif len(value) != length:
              raise ValueError(
                  "path has inconsistent lengths between "
                  "{!r} and {!r}.".format(length_key, key)
              )
      if not length:
          raise ValueError("Nothing in path")
      return length
  
file_path: garage/src/garage/replay_buffer/path_buffer.py
imports: import collections
  import numpy
  from garage import StepType, TimeStepBatch
label_desc: Use image node_id 10 for calling the PathBuffer obj's underlying member method code with example usage: obj._get_path_length(path) and returns: length