parameters: (self, val)
return_statement: return float(self.sum) / len(self.dq)
docstring: :type val: int
          :rtype: float
docstring_summary: :type val: int
          :rtype: float
docstring_tokens: : type val : int : rtype : float
function: def next(self, val):
          """
          :type val: int
          :rtype: float
          """
          self.dq.append(val)
          self.sum += val
          if len(self.dq) > self.size:
              self.sum -= self.dq.popleft()
              
          return float(self.sum) / len(self.dq)
function_tokens: def next ( self , val ) : self . dq . append ( val ) self . sum += val if len ( self . dq ) > self . size : self . sum -= self . dq . popleft ( ) return float ( self . sum ) / len ( self . dq )