


from argparse import ArgumentParser

from .env import EnvironmentCommand




def     UpperCamelCase    (      )					->							Any:
     '''simple docstring'''





     lowercase_       :Any     =       ArgumentParser('''Diffusers CLI tool'''       ,		usage='''diffusers-cli <command> [<args>]'''		)
     lowercase_       :List[Any]     =       parser.add_subparsers(help='''diffusers-cli command helpers'''		)

     # Register commands
     EnvironmentCommand.register_subcommand(_a		)

     # Let's go
     lowercase_       :Union[str, Any]     =       parser.parse_args()

     if not hasattr(_a       ,		'''func'''		):
          parser.print_help()
          exit(1		)

     # Run
     lowercase_       :Optional[Any]     =       args.func(_a		)
     service.run()


if __name__ == "__main__":
   main()





def     UpperCamelCase    (      _a       ,		_a		)					->							int:
     '''simple docstring'''





     while a != 0:
          lowercase_    ,      lowercase_       :Union[str, Any]     =       b % a, a
     return b




def     UpperCamelCase    (      _a       ,		_a		)					->							int:
     '''simple docstring'''





     if gcd(_a       ,		_a		) != 1:
          lowercase_       :Union[str, Any]     =       f"mod inverse of {a!r} and {m!r} does not exist"
          raise ValueError(_a		)
     lowercase_    ,      lowercase_    ,      lowercase_       :Any     =       1, 0, a
     lowercase_    ,      lowercase_    ,      lowercase_       :List[str]     =       0, 1, m
     while va != 0:
          lowercase_       :Tuple     =       ua // va
          lowercase_    ,      lowercase_    ,      lowercase_    ,      lowercase_    ,      lowercase_    ,      lowercase_       :Optional[int]     =       (ua - q * va), (ua - q * va), (ua - q * va), va, va, va
     return ua % m

