
import json

import requests

from .fetch_github_info import AUTHENTICATED_USER_ENDPOINT, fetch_github_info





def 		SCREAMING_SNAKE_CASE__      ( __lowerCAmelCase							):




    class    _SCREAMING_SNAKE_CASE					:
          def __init__(     self						,		lowerCamelCase	):
              assert isinstance(lowerCamelCase						,		(bytes, str)	)
              snake_case__  =			content



          def A_     (     self	):
              return json.loads(self.content	)

    def mock_response(*__lowerCAmelCase      ,						**__lowerCAmelCase							):
        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(__lowerCAmelCase      ,						"get"      ,						__lowerCAmelCase							)
    snake_case__  =			fetch_github_info("token"							)
    assert result["login"] == "test"
    assert result["id"] == 1





def 		SCREAMING_SNAKE_CASE__      ( __lowerCAmelCase							):
    if len(__lowerCAmelCase							) > 1:
        snake_case__  =			len(__lowerCAmelCase							) // 2  # Finds the middle of the array
        snake_case__  =			arr[
            :middle_length
        ]  # Creates an array of the elements in the first half.
        snake_case__  =			arr[
            middle_length:
        ]  # Creates an array of the elements in the second half.
        snake_case__  =			len(__lowerCAmelCase							)
        snake_case__  =			len(__lowerCAmelCase							)
        merge(__lowerCAmelCase							)  # Starts sorting the left.
        merge(__lowerCAmelCase							)  # Starts sorting the right
        snake_case__  =			0  # Left Counter
        snake_case__  =			0  # Right Counter
        snake_case__  =			0  # Position Counter
        while (
            left_index < left_size and right_index < right_size
        ):  # Runs until the lowers size of the left and right are sorted.
            if left_array[left_index] < right_array[right_index]:
                snake_case__  =			left_array[left_index]
                left_index += 1
            else:
                snake_case__  =			right_array[right_index]
                right_index += 1
            index += 1
        while (
            left_index < left_size
        ):  # Adds the left over elements in the left half of the array
            snake_case__  =			left_array[left_index]
            left_index += 1
            index += 1
        while (
            right_index < right_size
        ):  # Adds the left over elements in the right half of the array
            snake_case__  =			right_array[right_index]
            right_index += 1
            index += 1
    return arr


if __name__ == "__main__":
     import doctest

     doctest.testmod()



