





def      _A       (		SCREAMING_SNAKE_CASE     :   int       ,       SCREAMING_SNAKE_CASE     :   int						):





  """simple docstring"""



  while a != 0:
    a__					,							a__	:					Optional[Any]										=b % a, a
  return b





def      _A       (		SCREAMING_SNAKE_CASE     :   int       ,       SCREAMING_SNAKE_CASE     :   int						):





  """simple docstring"""



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










"""simple docstring"""





from datetime import datetime

import matplotlib.pyplot as plt
import torch


def    _snake_case  (  _snake_case :	int	):
      for param in module.parameters():
            lowerCAmelCase    :		Optional[int]				=      False


def    _snake_case  (  ):
      lowerCAmelCase    :		List[str]				=      '''cuda''' if torch.cuda.is_available() else '''cpu'''
      if torch.backends.mps.is_available() and torch.backends.mps.is_built():
            lowerCAmelCase    :		Any				=      '''mps'''
      if device == "mps":
            print(
                '''WARNING: MPS currently doesn\'t seem to work, and messes up backpropagation without any visible torch'''
                ''' errors. I recommend using CUDA on a colab notebook or CPU instead if you\'re facing inexplicable issues'''
                ''' with generations.'''	)
      return device


def    _snake_case  (  _snake_case :	Dict	):
      lowerCAmelCase    :		Optional[int]				=      plt.imshow(_snake_case	)
      fig.axes.get_xaxis().set_visible(_snake_case	)
      fig.axes.get_yaxis().set_visible(_snake_case	)
      plt.show()






def    _snake_case  (  ):
      lowerCAmelCase    :		List[str]				=      datetime.now()
      lowerCAmelCase    :		Union[str, Any]				=      current_time.strftime('''%H:%M:%S'''	)
      return timestamp


