python – Card reader and smart card insertion and PIN verification

I was working on those 2 functions card_readers() and smart_card() using pyscard module (the only smartcard API ‘bridge’ for python)

# 2. Check, whether a card reader is plugged in

def card_readers():
    while not readers(): # as long as the list of inserted readers is empty (empty lists return false) 
        input("nNo card reader was detected. Insert one and press (ENTER) to try again...")

    print("nCard reader/s is/are connected to the system.")


# 3. Wait for a smartcard to be inserted

def smart_card():
    # Answer To Reset (ATR) <-- list of bytes, which is specific for different cards
    SMART_CARD_ATR = (0x3B, 0xF8, 0x13, 0x00, 0x00, 0x81, 0x31, 0xFE, 0x45, 0x4A, 0x43, 0x4F, 0x50, 0x76, 0x32, 0x34, 0x31, 0xB7)
    ''' card_reader_connection = readers()(0).createConnection()
        card_reader_connection.connect()
        print(card_reader_connection.getATR()) <-- returns the ATR of the card inserted in a reader '''

    card_type = ATRCardType(SMART_CARD_ATR)
    card_request = CardRequest(timeout = 3600, cardType = card_type)

    print("nWaiting for the card...", end = 'r')
    card_request.waitforcard()
    
    print(f"Smart card is inserted in the reader ({card_request.getReaders()(0)})")

But I have no idea on how to verify PIN of a smartcard. I saw something similar with sending APDU commands, but it didn’t help.