def return_as_dict(data, description):
    """
    :param data: return value of  cursor.execute.fetchone (single row only!)
    example:
        ('355e8...0a', datetime.datetime(2020, 10, 24, 22, 54), \
         'message', 100, 0, '[]', 0, '[]', 0, '[]', 0, 41825)

    :param description:  value of cursor.description

    :return: return dictionary of tuples {desc[0]: data[0], desc[1]: data[1]}
    """
    columns = [column[0] for column in description]
    dictionary = {}
    if data:
        for i in range(len(data)):
            dictionary[columns[i]] = data[i]
    else:
        for column in columns:
            dictionary[column] = None

    return dictionary