
"""simple docstring"""

from typing import Dict

from .base import GenericTensor, Pipeline
class      _UpperCAmelCase							(		SCREAMING_SNAKE_CASE_							):




      def     a_      (							self   ,       lowercase_=None   ,       lowercase_=None   ,       lowercase_=None   ,       **lowercase_							)						->					List[Any]:
          if tokenize_kwargs is None:
              UpperCAmelCase									=					{}

          if truncation is not None:
              if "truncation" in tokenize_kwargs:
                  raise ValueError(
                      'truncation parameter defined twice (given as keyword argument as well as in tokenize_kwargs)'							)
              UpperCAmelCase									=					truncation

          UpperCAmelCase									=					tokenize_kwargs

          UpperCAmelCase									=					{}
          if return_tensors is not None:
              UpperCAmelCase									=					return_tensors

          return preprocess_params, {}, postprocess_params




      def     a_      (							self   ,       lowercase_   ,       **lowercase_							)						->					Dict[str, GenericTensor]:
          UpperCAmelCase									=					self.framework
          UpperCAmelCase									=					self.tokenizer(lowercase_   ,       return_tensors=lowercase_   ,       **lowercase_							)
          return model_inputs




      def     a_      (							self   ,       lowercase_							)						->					str:
          UpperCAmelCase									=					self.model(**lowercase_							)
          return model_outputs




      def     a_      (							self   ,       lowercase_   ,       lowercase_=False							)						->					Dict:
          # [0] is the first available tensor, logits or last_hidden_state.
          if return_tensors:
              return model_outputs[0]
          if self.framework == "pt":
              return model_outputs[0].tolist()
          elif self.framework == "tf":
              return model_outputs[0].numpy().tolist()




      def __call__(							self   ,       *lowercase_   ,       **lowercase_							)						->					List[str]:
          return super().__call__(*lowercase_   ,       **lowercase_							)





"""simple docstring"""

import sys
import turtle




def     lowercase__						(					lowerCAmelCase				:					tuple[float, float] ,				lowerCAmelCase				:					tuple[float, float] ) ->      tuple[float, float]:






    """simple docstring"""




    return (pa[0] + pa[0]) / 2, (pa[1] + pa[1]) / 2




def     lowercase__						(					lowerCAmelCase				:					tuple[float, float] ,				lowerCAmelCase				:					tuple[float, float] ,				lowerCAmelCase				:					tuple[float, float] ,				lowerCAmelCase				:					int ,				) ->      None:






    """simple docstring"""




    my_pen.up()
    my_pen.goto(vertexa[0] ,				vertexa[1] )
    my_pen.down()
    my_pen.goto(vertexa[0] ,				vertexa[1] )
    my_pen.goto(vertexa[0] ,				vertexa[1] )
    my_pen.goto(vertexa[0] ,				vertexa[1] )

    if depth == 0:
        return

    triangle(lowerCAmelCase ,				get_mid(lowerCAmelCase ,				lowerCAmelCase ) ,				get_mid(lowerCAmelCase ,				lowerCAmelCase ) ,				depth - 1 )
    triangle(lowerCAmelCase ,				get_mid(lowerCAmelCase ,				lowerCAmelCase ) ,				get_mid(lowerCAmelCase ,				lowerCAmelCase ) ,				depth - 1 )
    triangle(lowerCAmelCase ,				get_mid(lowerCAmelCase ,				lowerCAmelCase ) ,				get_mid(lowerCAmelCase ,				lowerCAmelCase ) ,				depth - 1 )


if __name__ == "__main__":
   if len(sys.argv) != 2:
      raise ValueError(
          '''Correct format for using this script: '''
          '''python fractals.py <int:depth_for_fractal>'''
      )
   SCREAMING_SNAKE_CASE_    					=						turtle.Turtle()
   my_pen.ht()
   my_pen.speed(5)
   my_pen.pencolor('''red''')

   SCREAMING_SNAKE_CASE_    					=						[(-175, -125), (0, 175), (175, -125)]  # vertices of triangle
   triangle(vertices[0], vertices[1], vertices[2], int(sys.argv[1]))



