
import argparse

import torch

from transformers import LxmertConfig, LxmertForPreTraining, load_tf_weights_in_lxmert
from transformers.utils import logging


logging.set_verbosity_info()







def      snake_case		(							UpperCAmelCase	:       Tuple,						UpperCAmelCase	:       Dict,						UpperCAmelCase	:       Union[str, Any]   ):
				# Initialise PyTorch model
				A	 =      LxmertConfig.from_json_file(__UpperCamelCase   )
				print(f'Building PyTorch model from configuration: {config}'   )
				A	 =      LxmertForPreTraining(__UpperCamelCase   )

				# Load weights from tf checkpoint
				load_tf_weights_in_lxmert(__UpperCamelCase,						__UpperCamelCase,						__UpperCamelCase   )

				# Save pytorch-model
				print(f'Save PyTorch model to {pytorch_dump_path}'   )
				torch.save(model.state_dict(),						__UpperCamelCase   )


if __name__ == "__main__":
					lowerCAmelCase_           = argparse.ArgumentParser()
					# Required parameters
					parser.add_argument(
					    '--tf_checkpoint_path', default=None, type=str, required=True, help='Path to the TensorFlow checkpoint path.'
					)
					parser.add_argument(
					    '--config_file',
					    default=None,
					    type=str,
					    required=True,
					    help='The config json file corresponding to the pre-trained model. \nThis specifies the model architecture.',
					)
					parser.add_argument(
					    '--pytorch_dump_path', default=None, type=str, required=True, help='Path to the output PyTorch model.'
					)
					lowerCAmelCase_           = parser.parse_args()
					convert_tf_checkpoint_to_pytorch(args.tf_checkpoint_path, args.config_file, args.pytorch_dump_path)













from itertools import permutations







def      snake_case		(							UpperCAmelCase	:       tuple   ):
				if num[3] % 2 != 0:
								return False

				if (num[2] + num[3] + num[4]) % 3 != 0:
								return False

				if num[5] % 5 != 0:
								return False

				A	 =      [7, 11, 13, 17]
				for i, test in enumerate(UpperCAmelCase   ):
								if (num[i + 4] * 1_00 + num[i + 5] * 10 + num[i + 6]) % test != 0:
												return False
				return True







def      snake_case		(							UpperCAmelCase	:       int = 10   ):
				return sum(
				    int(''.join(map(UpperCAmelCase,						UpperCAmelCase   )   )   )
				    for num in permutations(range(UpperCAmelCase   )   )
				    if is_substring_divisible(UpperCAmelCase   )   )


if __name__ == "__main__":
					print(f'''{solution() = }''')





