public static function setAutoFlushBytes($bytes) {
    if (!is_int($bytes)) {
      throw new \InvalidArgumentException(
          'Bytes must be an integer but was ' . self::typeOrClass($bytes));
    }
    self::$auto_flush_bytes = $bytes;
  }