docs: def find_mode(data):
      """\
      Returns the appropriate QR Code mode (an integer constant) for the
      provided `data`.
  
      :param bytes data: Data to check.
      :rtype: int
      """
      if data.isdigit():
          return consts.MODE_NUMERIC
      if is_alphanumeric(data):
          return consts.MODE_ALPHANUMERIC
      if is_kanji(data):
          return consts.MODE_KANJI
      return consts.MODE_BYTE