






import json
import pathlib
import unittest

import numpy as np

from transformers.testing_utils import require_torch, require_vision, slow
from transformers.utils import is_torch_available, is_vision_available

from ...test_image_processing_common import ImageProcessingSavingTestMixin, prepare_image_inputs


if is_torch_available():
 import torch

if is_vision_available():
 from PIL import Image

 from transformers import ConditionalDetrImageProcessor


class     _a							(	unittest.TestCase     ):






  """simple docstring"""





  def __init__(  self		,		_UpperCAmelCase		,		_UpperCAmelCase=7		,		_UpperCAmelCase=3		,		_UpperCAmelCase=30		,		_UpperCAmelCase=400		,		_UpperCAmelCase=True		,		_UpperCAmelCase=None		,		_UpperCAmelCase=True		,		_UpperCAmelCase=[0.5, 0.5, 0.5]		,		_UpperCAmelCase=[0.5, 0.5, 0.5]		,		_UpperCAmelCase=True		,		_UpperCAmelCase=1 / 255		,		_UpperCAmelCase=True		,		)      ->			str:
     # by setting size["longest_edge"] > max_resolution we're effectively not testing this :p
     UpperCamelCase_						=  size if size is not None else {'shortest_edge': 18, 'longest_edge': 1333}
     UpperCamelCase_						=  parent
     UpperCamelCase_						=  batch_size
     UpperCamelCase_						=  num_channels
     UpperCamelCase_						=  min_resolution
     UpperCamelCase_						=  max_resolution
     UpperCamelCase_						=  do_resize
     UpperCamelCase_						=  size
     UpperCamelCase_						=  do_normalize
     UpperCamelCase_						=  image_mean
     UpperCamelCase_						=  image_std
     UpperCamelCase_						=  do_rescale
     UpperCamelCase_						=  rescale_factor
     UpperCamelCase_						=  do_pad




  def  _UpperCAmelCase  (  self			)      ->			int:
     return {
         "do_resize": self.do_resize,
         "size": self.size,
         "do_normalize": self.do_normalize,
         "image_mean": self.image_mean,
         "image_std": self.image_std,
         "do_rescale": self.do_rescale,
         "rescale_factor": self.rescale_factor,
         "do_pad": self.do_pad,
     }




  def  _UpperCAmelCase  (  self		,		_UpperCAmelCase		,		_UpperCAmelCase=False			)      ->			Tuple:
     if not batched:
        UpperCamelCase_						=  image_inputs[0]
        if isinstance(_UpperCAmelCase		,		Image.Image			):
           UpperCamelCase_		,   UpperCamelCase_						=  image.size
        else:
           UpperCamelCase_		,   UpperCamelCase_						=  image.shape[1], image.shape[2]
        if w < h:
           UpperCamelCase_						=  int(self.size['shortest_edge'] * h / w			)
           UpperCamelCase_						=  self.size['shortest_edge']
        elif w > h:
           UpperCamelCase_						=  self.size['shortest_edge']
           UpperCamelCase_						=  int(self.size['shortest_edge'] * w / h			)
        else:
           UpperCamelCase_						=  self.size['shortest_edge']
           UpperCamelCase_						=  self.size['shortest_edge']

     else:
        UpperCamelCase_						=  []
        for image in image_inputs:
           UpperCamelCase_		,   UpperCamelCase_						=  self.get_expected_values([image]			)
           expected_values.append((expected_height, expected_width)			)
        UpperCamelCase_						=  max(_UpperCAmelCase		,		key=lambda _UpperCAmelCase			: item[0]			)[0]
        UpperCamelCase_						=  max(_UpperCAmelCase		,		key=lambda _UpperCAmelCase			: item[1]			)[1]

     return expected_height, expected_width




@require_torch
@require_vision
class     _a							(	UpperCAmelCase__    ,							unittest.TestCase     ):






  """simple docstring"""





  A_						       = ConditionalDetrImageProcessor if is_vision_available() else None




  def  _UpperCAmelCase  (  self			)      ->			List[str]:
     UpperCamelCase_						=  ConditionalDetrImageProcessingTester(self			)




  @property
  def  _UpperCAmelCase  (  self			)      ->			int:
     return self.image_processor_tester.prepare_image_processor_dict()




  def  _UpperCAmelCase  (  self			)      ->			List[str]:
     UpperCamelCase_						=  self.image_processing_class(**self.image_processor_dict			)
     self.assertTrue(hasattr(_UpperCAmelCase		,		'image_mean'			)			)
     self.assertTrue(hasattr(_UpperCAmelCase		,		'image_std'			)			)
     self.assertTrue(hasattr(_UpperCAmelCase		,		'do_normalize'			)			)
     self.assertTrue(hasattr(_UpperCAmelCase		,		'do_resize'			)			)
     self.assertTrue(hasattr(_UpperCAmelCase		,		'size'			)			)




  def  _UpperCAmelCase  (  self			)      ->			Optional[Any]:
     UpperCamelCase_						=  self.image_processing_class.from_dict(self.image_processor_dict			)
     self.assertEqual(image_processor.size		,		{'shortest_edge': 18, 'longest_edge': 1333}			)
     self.assertEqual(image_processor.do_pad		,		_UpperCAmelCase			)

     UpperCamelCase_						=  self.image_processing_class.from_dict(
         self.image_processor_dict		,		size=42		,		max_size=84		,		pad_and_return_pixel_mask=_UpperCAmelCase			)
     self.assertEqual(image_processor.size		,		{'shortest_edge': 42, 'longest_edge': 84}			)
     self.assertEqual(image_processor.do_pad		,		_UpperCAmelCase			)




  def  _UpperCAmelCase  (  self			)      ->			Dict:
     pass




  def  _UpperCAmelCase  (  self			)      ->			List[Any]:
     # Initialize image_processing
     UpperCamelCase_						=  self.image_processing_class(**self.image_processor_dict			)
     # create random PIL images
     UpperCamelCase_						=  prepare_image_inputs(self.image_processor_tester		,		equal_resolution=_UpperCAmelCase			)
     for image in image_inputs:
        self.assertIsInstance(_UpperCAmelCase		,		Image.Image			)

     # Test not batched input
     UpperCamelCase_						=  image_processing(image_inputs[0]		,		return_tensors='pt'			).pixel_values

     UpperCamelCase_		,   UpperCamelCase_						=  self.image_processor_tester.get_expected_values(_UpperCAmelCase			)

     self.assertEqual(
         encoded_images.shape		,		(1, self.image_processor_tester.num_channels, expected_height, expected_width)		,		)

     # Test batched
     UpperCamelCase_		,   UpperCamelCase_						=  self.image_processor_tester.get_expected_values(_UpperCAmelCase		,		batched=_UpperCAmelCase			)

     UpperCamelCase_						=  image_processing(_UpperCAmelCase		,		return_tensors='pt'			).pixel_values
     self.assertEqual(
         encoded_images.shape		,		(
             self.image_processor_tester.batch_size,
             self.image_processor_tester.num_channels,
             expected_height,
             expected_width,
         )		,		)




  def  _UpperCAmelCase  (  self			)      ->			int:
     # Initialize image_processing
     UpperCamelCase_						=  self.image_processing_class(**self.image_processor_dict			)
     # create random numpy tensors
     UpperCamelCase_						=  prepare_image_inputs(self.image_processor_tester		,		equal_resolution=_UpperCAmelCase		,		numpify=_UpperCAmelCase			)
     for image in image_inputs:
        self.assertIsInstance(_UpperCAmelCase		,		np.ndarray			)

     # Test not batched input
     UpperCamelCase_						=  image_processing(image_inputs[0]		,		return_tensors='pt'			).pixel_values

     UpperCamelCase_		,   UpperCamelCase_						=  self.image_processor_tester.get_expected_values(_UpperCAmelCase			)

     self.assertEqual(
         encoded_images.shape		,		(1, self.image_processor_tester.num_channels, expected_height, expected_width)		,		)

     # Test batched
     UpperCamelCase_						=  image_processing(_UpperCAmelCase		,		return_tensors='pt'			).pixel_values

     UpperCamelCase_		,   UpperCamelCase_						=  self.image_processor_tester.get_expected_values(_UpperCAmelCase		,		batched=_UpperCAmelCase			)

     self.assertEqual(
         encoded_images.shape		,		(
             self.image_processor_tester.batch_size,
             self.image_processor_tester.num_channels,
             expected_height,
             expected_width,
         )		,		)




  def  _UpperCAmelCase  (  self			)      ->			Any:
     # Initialize image_processing
     UpperCamelCase_						=  self.image_processing_class(**self.image_processor_dict			)
     # create random PyTorch tensors
     UpperCamelCase_						=  prepare_image_inputs(self.image_processor_tester		,		equal_resolution=_UpperCAmelCase		,		torchify=_UpperCAmelCase			)
     for image in image_inputs:
        self.assertIsInstance(_UpperCAmelCase		,		torch.Tensor			)

     # Test not batched input
     UpperCamelCase_						=  image_processing(image_inputs[0]		,		return_tensors='pt'			).pixel_values

     UpperCamelCase_		,   UpperCamelCase_						=  self.image_processor_tester.get_expected_values(_UpperCAmelCase			)

     self.assertEqual(
         encoded_images.shape		,		(1, self.image_processor_tester.num_channels, expected_height, expected_width)		,		)

     # Test batched
     UpperCamelCase_						=  image_processing(_UpperCAmelCase		,		return_tensors='pt'			).pixel_values

     UpperCamelCase_		,   UpperCamelCase_						=  self.image_processor_tester.get_expected_values(_UpperCAmelCase		,		batched=_UpperCAmelCase			)

     self.assertEqual(
         encoded_images.shape		,		(
             self.image_processor_tester.batch_size,
             self.image_processor_tester.num_channels,
             expected_height,
             expected_width,
         )		,		)




  @slow
  def  _UpperCAmelCase  (  self			)      ->			Any:
     # prepare image and target
     UpperCamelCase_						=  Image.open('./tests/fixtures/tests_samples/COCO/000000039769.png'			)
     with open('./tests/fixtures/tests_samples/COCO/coco_annotations.txt'		,		'r'			) as f:
        UpperCamelCase_						=  json.loads(f.read()			)

     UpperCamelCase_						=  {'image_id': 39769, 'annotations': target}

     # encode them
     UpperCamelCase_						=  ConditionalDetrImageProcessor.from_pretrained('microsoft/conditional-detr-resnet-50'			)
     UpperCamelCase_						=  image_processing(images=_UpperCAmelCase		,		annotations=_UpperCAmelCase		,		return_tensors='pt'			)

     # verify pixel values
     UpperCamelCase_						=  torch.Size([1, 3, 800, 1066]			)
     self.assertEqual(encoding['pixel_values'].shape		,		_UpperCAmelCase			)

     UpperCamelCase_						=  torch.tensor([0.2_7_9_6, 0.3_1_3_8, 0.3_4_8_1]			)
     self.assertTrue(torch.allclose(encoding['pixel_values'][0, 0, 0, :3]		,		_UpperCAmelCase		,		atol=1e-4			)			)

     # verify area
     UpperCamelCase_						=  torch.tensor([5_8_8_7.9_6_0_0, 1_1_2_5_0.2_0_6_1, 4_8_9_3_5_3.8_4_3_8, 8_3_7_1_2_2.7_5_0_0, 1_4_7_9_6_7.5_1_5_6, 1_6_5_7_3_2.3_4_3_8]			)
     self.assertTrue(torch.allclose(encoding['labels'][0]['area']		,		_UpperCAmelCase			)			)
     # verify boxes
     UpperCamelCase_						=  torch.Size([6, 4]			)
     self.assertEqual(encoding['labels'][0]['boxes'].shape		,		_UpperCAmelCase			)
     UpperCamelCase_						=  torch.tensor([0.5_5_0_3, 0.2_7_6_5, 0.0_6_0_4, 0.2_2_1_5]			)
     self.assertTrue(torch.allclose(encoding['labels'][0]['boxes'][0]		,		_UpperCAmelCase		,		atol=1e-3			)			)
     # verify image_id
     UpperCamelCase_						=  torch.tensor([39769]			)
     self.assertTrue(torch.allclose(encoding['labels'][0]['image_id']		,		_UpperCAmelCase			)			)
     # verify is_crowd
     UpperCamelCase_						=  torch.tensor([0, 0, 0, 0, 0, 0]			)
     self.assertTrue(torch.allclose(encoding['labels'][0]['iscrowd']		,		_UpperCAmelCase			)			)
     # verify class_labels
     UpperCamelCase_						=  torch.tensor([75, 75, 63, 65, 17, 17]			)
     self.assertTrue(torch.allclose(encoding['labels'][0]['class_labels']		,		_UpperCAmelCase			)			)
     # verify orig_size
     UpperCamelCase_						=  torch.tensor([480, 640]			)
     self.assertTrue(torch.allclose(encoding['labels'][0]['orig_size']		,		_UpperCAmelCase			)			)
     # verify size
     UpperCamelCase_						=  torch.tensor([800, 1066]			)
     self.assertTrue(torch.allclose(encoding['labels'][0]['size']		,		_UpperCAmelCase			)			)




  @slow
  def  _UpperCAmelCase  (  self			)      ->			List[Any]:
     # prepare image, target and masks_path
     UpperCamelCase_						=  Image.open('./tests/fixtures/tests_samples/COCO/000000039769.png'			)
     with open('./tests/fixtures/tests_samples/COCO/coco_panoptic_annotations.txt'		,		'r'			) as f:
        UpperCamelCase_						=  json.loads(f.read()			)

     UpperCamelCase_						=  {'file_name': '000000039769.png', 'image_id': 39769, 'segments_info': target}

     UpperCamelCase_						=  pathlib.Path('./tests/fixtures/tests_samples/COCO/coco_panoptic'			)

     # encode them
     UpperCamelCase_						=  ConditionalDetrImageProcessor(format='coco_panoptic'			)
     UpperCamelCase_						=  image_processing(images=_UpperCAmelCase		,		annotations=_UpperCAmelCase		,		masks_path=_UpperCAmelCase		,		return_tensors='pt'			)

     # verify pixel values
     UpperCamelCase_						=  torch.Size([1, 3, 800, 1066]			)
     self.assertEqual(encoding['pixel_values'].shape		,		_UpperCAmelCase			)

     UpperCamelCase_						=  torch.tensor([0.2_7_9_6, 0.3_1_3_8, 0.3_4_8_1]			)
     self.assertTrue(torch.allclose(encoding['pixel_values'][0, 0, 0, :3]		,		_UpperCAmelCase		,		atol=1e-4			)			)

     # verify area
     UpperCamelCase_						=  torch.tensor([1_4_7_9_7_9.6_8_7_5, 1_6_5_5_2_7.0_4_6_9, 4_8_4_6_3_8.5_9_3_8, 1_1_2_9_2.9_3_7_5, 5_8_7_9.6_5_6_2, 7_6_3_4.1_1_4_7]			)
     self.assertTrue(torch.allclose(encoding['labels'][0]['area']		,		_UpperCAmelCase			)			)
     # verify boxes
     UpperCamelCase_						=  torch.Size([6, 4]			)
     self.assertEqual(encoding['labels'][0]['boxes'].shape		,		_UpperCAmelCase			)
     UpperCamelCase_						=  torch.tensor([0.2_6_2_5, 0.5_4_3_7, 0.4_6_8_8, 0.8_6_2_5]			)
     self.assertTrue(torch.allclose(encoding['labels'][0]['boxes'][0]		,		_UpperCAmelCase		,		atol=1e-3			)			)
     # verify image_id
     UpperCamelCase_						=  torch.tensor([39769]			)
     self.assertTrue(torch.allclose(encoding['labels'][0]['image_id']		,		_UpperCAmelCase			)			)
     # verify is_crowd
     UpperCamelCase_						=  torch.tensor([0, 0, 0, 0, 0, 0]			)
     self.assertTrue(torch.allclose(encoding['labels'][0]['iscrowd']		,		_UpperCAmelCase			)			)
     # verify class_labels
     UpperCamelCase_						=  torch.tensor([17, 17, 63, 75, 75, 93]			)
     self.assertTrue(torch.allclose(encoding['labels'][0]['class_labels']		,		_UpperCAmelCase			)			)
     # verify masks
     UpperCamelCase_						=  822873
     self.assertEqual(encoding['labels'][0]['masks'].sum().item()		,		_UpperCAmelCase			)
     # verify orig_size
     UpperCamelCase_						=  torch.tensor([480, 640]			)
     self.assertTrue(torch.allclose(encoding['labels'][0]['orig_size']		,		_UpperCAmelCase			)			)
     # verify size
     UpperCamelCase_						=  torch.tensor([800, 1066]			)
     self.assertTrue(torch.allclose(encoding['labels'][0]['size']		,		_UpperCAmelCase			)			)













import argparse
import os

import evaluate
import torch
from datasets import load_dataset
from torch.optim import AdamW
from torch.utils.data import DataLoader
from transformers import AutoModelForSequenceClassification, AutoTokenizer, get_linear_schedule_with_warmup, set_seed

from accelerate import Accelerator, DistributedType


########################################################################
# This is a fully working simple example to use Accelerate
# and perform gradient accumulation
#
# This example trains a Bert base model on GLUE MRPC
# in any of the following settings (with the same script):
#   - single CPU or single GPU
#   - multi GPUS (using PyTorch distributed mode)
#   - (multi) TPUs
#   - fp16 (mixed-precision) or fp32 (normal precision)
#
# To run it in each of these various modes, follow the instructions
# in the readme for examples:
# https://github.com/huggingface/accelerate/tree/main/examples
#
########################################################################


snake_case__   :						Dict													=   1_6
snake_case__   :						List[str]													=   3_2






def      _snake_case     (__lowercase     ,   __lowercase = 16):
   UpperCamelCase_						=  AutoTokenizer.from_pretrained('bert-base-cased')
   UpperCamelCase_						=  load_dataset('glue'     ,   'mrpc')

   def tokenize_function(__lowercase):
      # max_length=None => use the model max length (it's actually the default)
      UpperCamelCase_						=  tokenizer(examples['sentence1']     ,   examples['sentence2']     ,   truncation=__lowercase     ,   max_length=__lowercase)
      return outputs

   # Apply the method we just defined to all the examples in all the splits of the dataset
   # starting with the main process first:
   with accelerator.main_process_first():
      UpperCamelCase_						=  datasets.map(
          __lowercase     ,   batched=__lowercase     ,   remove_columns=['idx', 'sentence1', 'sentence2']     ,   )

   # We also rename the 'label' column to 'labels' which is the expected name for labels by the models of the
   # transformers library
   UpperCamelCase_						=  tokenized_datasets.rename_column('label'     ,   'labels')

   def collate_fn(__lowercase):
      # On TPU it's best to pad everything to the same length or training will be very slow.
      UpperCamelCase_						=  128 if accelerator.distributed_type == DistributedType.TPU else None
      # When using mixed precision we want round multiples of 8/16
      if accelerator.mixed_precision == "fp8":
         UpperCamelCase_						=  16
      elif accelerator.mixed_precision != "no":
         UpperCamelCase_						=  8
      else:
         UpperCamelCase_						=  None

      return tokenizer.pad(
          __lowercase     ,   padding='longest'     ,   max_length=__lowercase     ,   pad_to_multiple_of=__lowercase     ,   return_tensors='pt'     ,   )

   # Instantiate dataloaders.
   UpperCamelCase_						=  DataLoader(
       tokenized_datasets['train']     ,   shuffle=__lowercase     ,   collate_fn=__lowercase     ,   batch_size=__lowercase)
   UpperCamelCase_						=  DataLoader(
       tokenized_datasets['validation']     ,   shuffle=__lowercase     ,   collate_fn=__lowercase     ,   batch_size=__lowercase)

   return train_dataloader, eval_dataloader


# For testing only
if os.environ.get("""TESTING_MOCKED_DATALOADERS""", None) == "1":
 from accelerate.test_utils.training import mocked_dataloaders

 snake_case__   :						List[str]													=   mocked_dataloaders  # noqa: F811






def      _snake_case     (__lowercase     ,   __lowercase):
   # For testing only
   if os.environ.get('TESTING_MOCKED_DATALOADERS'     ,   __lowercase) == "1":
      UpperCamelCase_						=  2
   # New Code #
   UpperCamelCase_						=  int(args.gradient_accumulation_steps)
   # Initialize accelerator
   UpperCamelCase_						=  Accelerator(
       cpu=args.cpu     ,   mixed_precision=args.mixed_precision     ,   gradient_accumulation_steps=__lowercase)
   if accelerator.distributed_type == DistributedType.TPU and gradient_accumulation_steps > 1:
      raise NotImplementedError(
          'Gradient accumulation on TPUs is currently not supported. Pass `gradient_accumulation_steps=1`')
   # Sample hyper-parameters for learning rate, batch size, seed and a few other HPs
   UpperCamelCase_						=  config['lr']
   UpperCamelCase_						=  int(config['num_epochs'])
   UpperCamelCase_						=  int(config['seed'])
   UpperCamelCase_						=  int(config['batch_size'])

   UpperCamelCase_						=  evaluate.load('glue'     ,   'mrpc')

   set_seed(__lowercase)
   UpperCamelCase_		,   UpperCamelCase_						=  get_dataloaders(__lowercase     ,   __lowercase)
   # Instantiate the model (we build the model here so that the seed also control new weights initialization)
   UpperCamelCase_						=  AutoModelForSequenceClassification.from_pretrained('bert-base-cased'     ,   return_dict=__lowercase)

   # We could avoid this line since the accelerator is set with `device_placement=True` (default value).
   # Note that if you are placing tensors on devices manually, this line absolutely needs to be before the optimizer
   # creation otherwise training will not work on TPU (`accelerate` will kindly throw an error to make us aware of that).
   UpperCamelCase_						=  model.to(accelerator.device)

   # Instantiate optimizer
   UpperCamelCase_						=  AdamW(params=model.parameters()     ,   lr=__lowercase)

   # Instantiate scheduler
   UpperCamelCase_						=  get_linear_schedule_with_warmup(
       optimizer=__lowercase     ,   num_warmup_steps=100     ,   num_training_steps=(len(__lowercase) * num_epochs)     ,   )

   # Prepare everything
   # There is no specific order to remember, we just need to unpack the objects in the same order we gave them to the
   # prepare method.
   UpperCamelCase_		,   UpperCamelCase_		,   UpperCamelCase_		,   UpperCamelCase_		,   UpperCamelCase_						=  accelerator.prepare(
       __lowercase     ,   __lowercase     ,   __lowercase     ,   __lowercase     ,   __lowercase)

   # Now we train the model
   for epoch in range(__lowercase):
      model.train()
      for step, batch in enumerate(__lowercase):
         # We could avoid this line since we set the accelerator with `device_placement=True`.
         batch.to(accelerator.device)
         # New code #
         # We use the new `accumulate` context manager to perform gradient accumulation
         # We also currently do not support TPUs nor advise it as bugs were found on the XLA side when running our tests.
         with accelerator.accumulate(__lowercase):
            UpperCamelCase_						=  model(**__lowercase)
            UpperCamelCase_						=  output.loss
            accelerator.backward(__lowercase)
            optimizer.step()
            lr_scheduler.step()
            optimizer.zero_grad()

      model.eval()
      for step, batch in enumerate(__lowercase):
         # We could avoid this line since we set the accelerator with `device_placement=True`.
         batch.to(accelerator.device)
         with torch.no_grad():
            UpperCamelCase_						=  model(**__lowercase)
         UpperCamelCase_						=  outputs.logits.argmax(dim=-1)
         UpperCamelCase_		,   UpperCamelCase_						=  accelerator.gather_for_metrics((predictions, batch['labels']))
         metric.add_batch(
             predictions=__lowercase     ,   references=__lowercase     ,   )

      UpperCamelCase_						=  metric.compute()
      # Use accelerator.print to print only on the main process.
      accelerator.print(f"""epoch {epoch}:"""     ,   __lowercase)






def      _snake_case     ():
   UpperCamelCase_						=  argparse.ArgumentParser(description='Simple example of training script.')
   parser.add_argument(
       '--mixed_precision'     ,   type=__lowercase     ,   default=__lowercase     ,   choices=['no', 'fp16', 'bf16', 'fp8']     ,   help='Whether to use mixed precision. Choose'
       'between fp16 and bf16 (bfloat16). Bf16 requires PyTorch >= 1.10.'
       'and an Nvidia Ampere GPU.'     ,   )
   # New Code #
   parser.add_argument(
       '--gradient_accumulation_steps'     ,   type=__lowercase     ,   default=1     ,   help='The number of minibatches to be ran before gradients are accumulated.'     ,   )
   parser.add_argument('--cpu'     ,   action='store_true'     ,   help='If passed, will train on the CPU.')
   UpperCamelCase_						=  parser.parse_args()
   UpperCamelCase_						=  {'lr': 2e-5, 'num_epochs': 3, 'seed': 42, 'batch_size': 16}
   training_function(__lowercase     ,   __lowercase)


if __name__ == "__main__":
 main()





