class_docstr: Deque implementation using a numpy array as a circular buffer.
code: def add(self, value: Any):
      insert_idx = int((self._start_index + self._len) % self._maxlen)
  
      # Increase buffer size if necessary.
      if np.isinf(self._maxlen) and insert_idx >= self._buffer.shape[0]:
          new_len = self._buffer.shape[0] * 2
          self._buffer.resize((new_len,), refcheck=False)
  
      self._buffer[insert_idx] = value
      if self._len < self._maxlen:
          self._len += 1
      else:
          self._start_index = np.mod(
              self._start_index + 1, self._maxlen
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  from typing import Any, Iterable, Optional, Text
  import gin
  import numpy
  import six
  from tf_agents.metrics import py_metric
  from tf_agents.trajectories import trajectory
  from tf_agents.typing import types
  from tf_agents.utils import nest_utils
  from tf_agents.utils import numpy_storage
label_desc: Use image node_id 3 for calling the NumpyDeque obj's underlying member method code with example usage: obj.add(value) without return types