code: def _credit_card_type(self, card_type=None):
          
          if card_type is None:
              card_type = self.random_element(self.credit_card_types.keys())
          elif isinstance(card_type, CreditCard):
              return card_type
          return self.credit_card_types[card_type]
docs: Returns a random credit card type instance.