class_docstr: An episodic ReplayBuffer with Uniform sampling.
class_docstr_tok: ["An","episodic","ReplayBuffer","with","Uniform","sampling","."]
docstr: Increments the length of episode_id in a thread safe manner.
  
  NOTE: This method should only be called inside a critical section.
  
  Args:
    episode_id: int64 scalar of vector. ID(s) of the episode(s) for which we
      will increase the length.
    increment: Amount to increment episode_length by.
  
  Returns:
    An op that increments the last_id.
  Raises:
    ValueError: If `len(episode_id.shape) > 1`.
code: def _increment_episode_length_locked(self, episode_id, increment=1):
      """Increments the length of episode_id in a thread safe manner.
  
      NOTE: This method should only be called inside a critical section.
  
      Args:
        episode_id: int64 scalar of vector. ID(s) of the episode(s) for which we
          will increase the length.
        increment: Amount to increment episode_length by.
  
      Returns:
        An op that increments the last_id.
      Raises:
        ValueError: If `len(episode_id.shape) > 1`.
      """
      episode_location = self._get_episode_id_location(episode_id)
  
      def _assign_add():
          new_length = (
              self._episode_lengths[episode_location] + increment
          )
          update_length = tf.compat.v1.scatter_update(
              self._episode_lengths, [episode_location], new_length
          )
          with tf.control_dependencies([update_length]):
              return tf.identity(new_length)
  
      def _assign_add_multiple():
          new_length = tf.gather(
              self._episode_lengths, episode_location
          )
          new_length += increment
          update_length = tf.compat.v1.scatter_update(
              self._episode_lengths, episode_location, new_length
          )
          with tf.control_dependencies([update_length]):
              return tf.identity(new_length)
  
      if episode_location.shape.rank == 0:
          return _assign_add()
      elif episode_location.shape.rank == 1:
          return _assign_add_multiple()
      else:
          raise ValueError("episode_id must have rank <= 1")
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import gin
  import tensorflow
  from tf_agents import specs
  from tf_agents.replay_buffers import episodic_table
  from tf_agents.replay_buffers import replay_buffer
  from tf_agents.replay_buffers import table
  from tf_agents.utils import common
  from tensorflow.python.data.util import nest
  from tensorflow.python.layers import utils
  from tensorflow.python.ops import list_ops
  from tensorflow.python.ops.distributions import util
label_desc: Use image node_id 24 for calling the EpisodicReplayBuffer obj's underlying member method code with example usage: obj._increment_episode_length_locked(episode_id, increment) and returns: _assign_add, tf, tf, _assign_add_multiple