def block_date(cursor, imei_norm):
    """
    Method to get block date of an IMEI from Notification and Blacklist.

    :param cursor: db cursor
    :param imei_norm: normalized imei
    :return: block date or none
    """
    # check if it is in blacklist
    cursor.execute("""SELECT block_date, delta_reason
                        FROM blacklist
                       WHERE imei_norm = %(imei_norm)s
                         AND virt_imei_shard = calc_virt_imei_shard(%(imei_norm)s)
                    ORDER BY start_run_id DESC""",
                   {'imei_norm': imei_norm})
    blacklist_block_date = cursor.fetchone()
    if blacklist_block_date is not None and blacklist_block_date.delta_reason != 'unblocked':
        return blacklist_block_date.block_date
    else:
        # check if it is in notification list
        cursor.execute("""SELECT block_date, delta_reason
                            FROM notifications_lists
                           WHERE imei_norm = %(imei_norm)s
                             AND virt_imei_shard = calc_virt_imei_shard(%(imei_norm)s)
                        ORDER BY start_run_id DESC""",
                       {'imei_norm': imei_norm})
        notification_block_date = cursor.fetchone()
        if notification_block_date is not None and notification_block_date.delta_reason != 'resolved':
            return notification_block_date.block_date
        return None