docs: def decode_mysql_literal(text):
      """
      Attempts to decode given MySQL literal into Python value.
  
      :param text: Value to be decoded, as MySQL literal.
      :type text: str
  
      :return: Python version of the given MySQL literal.
      :rtype: any
      """
      if MYSQL_NULL_PATTERN.match(text):
          return None
  
      if MYSQL_BOOLEAN_PATTERN.match(text):
          return text.lower() == "true"
  
      if MYSQL_FLOAT_PATTERN.match(text):
          return float(text)
  
      if MYSQL_INT_PATTERN.match(text):
          return int(text)
  
      if MYSQL_STRING_PATTERN.match(text):
          return decode_mysql_string_literal(text)
  
      raise ValueError("Unable to decode given value: %r" % (text,))