

from __future__ import annotations

import math
import random


def 				_UpperCAmelCase							(	a__     ,  a__     ,  a__):

			'''simple docstring'''



			a_	:	str          =   d * e - 1
			a_	:	Dict          =   0
			a_	:	Optional[Any]          =   0
			while p == 0:
						a_	:	Optional[Any]          =   random.randint(2     ,  n - 1)
						a_	:	Optional[int]          =   k
						while True:
									if t % 2 == 0:
												a_	:	Optional[int]          =   t // 2
												a_	:	str          =   (g**t) % n
												a_	:	Optional[int]          =   math.gcd(x - 1     ,  a__)
												if x > 1 and y > 1:
															a_	:	int          =   y
															a_	:	Union[str, Any]          =   n // y
															break  # find the correct factors
									else:
												break  # t is not divisible by 2, break and choose another g
			return sorted([p, q])


if __name__ == "__main__":
							import doctest

							doctest.testmod()





import json

import requests

from .fetch_github_info import AUTHENTICATED_USER_ENDPOINT, fetch_github_info


def 				_UpperCAmelCase							(	a__):

			'''simple docstring'''



			class 					A__:
									"""simple docstring"""






									def __init__(						self     ,			_lowercase						)    ->   None:
												assert isinstance(_lowercase     ,			(bytes, str)						)
												a_	:	List[Any]          =   content





									def  UpperCamelCase__				(						self						)    ->   Optional[Any]:
												return json.loads(self.content						)

			def mock_response(*a__     ,  **a__):
						assert args[0] == AUTHENTICATED_USER_ENDPOINT
						assert "Authorization" in kwargs["headers"]
						assert kwargs["headers"]["Authorization"].startswith("""token """)
						assert "Accept" in kwargs["headers"]
						return FakeResponse(B"""{\"login\":\"test\",\"id\":1}""")

			monkeypatch.setattr(a__     ,  """get"""     ,  a__)
			a_	:	Tuple          =   fetch_github_info("""token""")
			assert result["login"] == "test"
			assert result["id"] == 1


