code: def getATR(reader):
      
      connection = reader.createConnection()
      atr = ""
      try:
          connection.connect()
          atr = smartcard.util.toHexString(connection.getATR())
          connection.disconnect()
      except smartcard.Exceptions.NoCardException:
          atr = "no card inserted"
      return atr
docs: Return the ATR of the card inserted into the reader.