code: def clear(self):
      
      value = self._sum / tf.cast(self._count, self._dtype)
      with tf.control_dependencies([value]):
        reset_value = self._sum.assign(tf.zeros_like(self._sum))
        reset_count = self._count.assign(0)
      with tf.control_dependencies([reset_value, reset_count]):
        return tf.identity(value)
docs: Return the mean estimate and reset the streaming statistics.