code: def resize(self, maxLen):
      assert maxLen > 0, "Invalid maximum length"
  
      # Create empty, copy last values and swap.
      values = np.empty(maxLen, dtype=self.__values.dtype)
      lastValues = self.__values[0 : self.__nextPos]
      values[0 : min(maxLen, len(lastValues))] = lastValues[
          -1 * min(maxLen, len(lastValues)) :
      ]
      self.__values = values
  
      self.__maxLen = maxLen
      if self.__nextPos >= self.__maxLen:
          self.__nextPos = self.__maxLen
  
imports: import numpy
label_desc: Use image node_id 5 for calling the NumPyDeque obj's underlying member method code with example usage: obj.resize(maxLen) without return types