
def 		UpperCamelCase						(   lowercase_ )		->						bool:


  '''simple docstring'''






  return credit_card_number.startswith(("""34""", """35""", """37""", """4""", """5""", """6""") )

def 		UpperCamelCase						(   lowercase_ )		->						bool:


  '''simple docstring'''






  lowercase__	: int     		=   credit_card_number
  lowercase__	: Dict     		=   0
  lowercase__	: Dict     		=   len(lowercase_ ) - 2
  for i in range(lowercase_			,			-1			,			-2 ):
    #  double the value of every second digit
    lowercase__	: str     		=   int(cc_number[i] )
    digit *= 2
    # If doubling of a number results in a two digit number
    # i.e greater than 9(e.g., 6 × 2 = 12),
    # then add the digits of the product (e.g., 12: 1 + 2 = 3, 15: 1 + 5 = 6),
    # to get a single digit number.
    if digit > 9:
      digit %= 10
      digit += 1
    lowercase__	: Optional[int]     		=   cc_number[:i] + str(lowercase_ ) + cc_number[i + 1 :]
    total += digit

  # Sum up the remaining digits
  for i in range(len(lowercase_ ) - 1			,			-1			,			-2 ):
    total += int(cc_number[i] )

  return total % 10 == 0

def 		UpperCamelCase						(   lowercase_ )		->						bool:


  '''simple docstring'''






  lowercase__	: str     		=   F'{credit_card_number} is an invalid credit card number because'
  if not credit_card_number.isdigit():
    print(F'{error_message} it has nonnumerical characters.' )
    return False

  if not 13 <= len(lowercase_ ) <= 16:
    print(F'{error_message} of its length.' )
    return False

  if not validate_initial_digits(lowercase_ ):
    print(F'{error_message} of its first two digits.' )
    return False

  if not luhn_validation(lowercase_ ):
    print(F'{error_message} it fails the Luhn check.' )
    return False

  print(F'{credit_card_number} is a valid credit card number.' )
  return True


if __name__ == "__main__":
     import doctest

     doctest.testmod()
     validate_credit_card_number("""4111111111111111""")
     validate_credit_card_number("""32323""")










from ...processing_utils import ProcessorMixin







class 	__lowercase    (__SCREAMING_SNAKE_CASE  ):





							"""simple docstring"""







							_UpperCAmelCase      =						"""WhisperFeatureExtractor"""
							_UpperCAmelCase      =						"""WhisperTokenizer"""






							def __init__(      self			,						lowerCAmelCase__			,						lowerCAmelCase__       ):





										"""simple docstring"""




										super().__init__(lowerCAmelCase__			,						lowerCAmelCase__       )
										SCREAMING_SNAKE_CASE_		:     Union[str, Any]					=					self.feature_extractor
										SCREAMING_SNAKE_CASE_		:     List[Any]					=					False






							def 					UpperCamelCase__     (      self			,						lowerCAmelCase__=None			,						lowerCAmelCase__=None			,						lowerCAmelCase__=True       ):





										"""simple docstring"""




										return self.tokenizer.get_decoder_prompt_ids(task=lowerCAmelCase__			,						language=lowerCAmelCase__			,						no_timestamps=lowerCAmelCase__       )






							def __call__(      self			,						*lowerCAmelCase__			,						**lowerCAmelCase__       ):





										"""simple docstring"""




										if self._in_target_context_manager:
													return self.current_processor(*lowerCAmelCase__			,						**lowerCAmelCase__       )

										SCREAMING_SNAKE_CASE_		:     Tuple					=					kwargs.pop('audio'			,						lowerCAmelCase__       )
										SCREAMING_SNAKE_CASE_		:     str					=					kwargs.pop('sampling_rate'			,						lowerCAmelCase__       )
										SCREAMING_SNAKE_CASE_		:     Optional[Any]					=					kwargs.pop('text'			,						lowerCAmelCase__       )
										if len(lowerCAmelCase__       ) > 0:
													SCREAMING_SNAKE_CASE_		:     List[Any]					=					args[0]
													SCREAMING_SNAKE_CASE_		:     List[Any]					=					args[1:]

										if audio is None and text is None:
													raise ValueError('You need to specify either an `audio` or `text` input to process.'       )

										if audio is not None:
													SCREAMING_SNAKE_CASE_		:     List[Any]					=					self.feature_extractor(lowerCAmelCase__			,						*lowerCAmelCase__			,						sampling_rate=lowerCAmelCase__			,						**lowerCAmelCase__       )
										if text is not None:
													SCREAMING_SNAKE_CASE_		:     Optional[int]					=					self.tokenizer(lowerCAmelCase__			,						**lowerCAmelCase__       )

										if text is None:
													return inputs

										elif audio is None:
													return encodings
										else:
													SCREAMING_SNAKE_CASE_		:     Optional[int]					=					encodings['input_ids']
													return inputs






							def 					UpperCamelCase__     (      self			,						*lowerCAmelCase__			,						**lowerCAmelCase__       ):





										"""simple docstring"""




										return self.tokenizer.batch_decode(*lowerCAmelCase__			,						**lowerCAmelCase__       )






							def 					UpperCamelCase__     (      self			,						*lowerCAmelCase__			,						**lowerCAmelCase__       ):





										"""simple docstring"""




										return self.tokenizer.decode(*lowerCAmelCase__			,						**lowerCAmelCase__       )






							def 					UpperCamelCase__     (      self			,						lowerCAmelCase__			,						lowerCAmelCase__="np"       ):





										"""simple docstring"""




										return self.tokenizer.get_prompt_ids(lowerCAmelCase__			,						return_tensors=lowerCAmelCase__       )





