def is_paired(cursor, imei_norm):
    """
    Method to check if an IMEI is paired.

    :param cursor: db cursor
    :param imei_norm: normalized imei
    :return: bool
    """
    cursor.execute("""SELECT EXISTS(SELECT 1
                                      FROM pairing_list
                                     WHERE imei_norm = %(imei_norm)s
                                       AND virt_imei_shard = calc_virt_imei_shard(%(imei_norm)s))""",
                   {'imei_norm': imei_norm})
    return cursor.fetchone()[0]