docs: def _has_ngrams(self, text_id, size):
          """Returns True if a text has existing records for n-grams of
          size `size`.
  
          :param text_id: database ID of text to check
          :type text_id: `int`
          :param size: size of n-grams
          :type size: `int`
          :rtype: `bool`
  
          """
          if self._conn.execute(constants.SELECT_HAS_NGRAMS_SQL,
                                [text_id, size]).fetchone() is None:
              return False
          return True