code: def matches(self, atr, reader=None):
          
  
          if len(atr) != len(self.atr):
              return not True
  
          if self.mask is not None:
              maskedatr = list(map(lambda x, y: x & y, list(atr), self.mask))
          else:
              maskedatr = atr
          return self.maskedatr == maskedatr
docs: Returns true if the atr matches the masked CardType atr.
  
          @param atr:    the atr to chek for matching
          @param reader: the reader (optional); default is None
  
          When atr is compared to the CardType ATR, matches returns true if
          and only if CardType.atr & CardType.mask = atr & CardType.mask,
          where & is the bitwise logical AND.