
from __future__ import annotations

import os
from typing import Any

import requests

__lowerCAmelCase     :	Optional[Any]       			=  """https://api.github.com"""

# https://docs.github.com/en/free-pro-team@latest/rest/reference/users#get-the-authenticated-user
__lowerCAmelCase     :	Optional[Any]       			=  BASE_URL + """/user"""

# https://github.com/settings/tokens
__lowerCAmelCase     :	int       			=  os.environ.get('USER_TOKEN', '')

def a__       (			A_   ):






  '''simple docstring'''





  __magic_name__								=			{
      "Authorization": f'''token {auth_token}''',
      "Accept": "application/vnd.github.v3+json",
  }
  return requests.get(A_,	headers=A_   ).json()


if __name__ == "__main__":  # pragma: no cover
    if USER_TOKEN:
        for key, value in fetch_github_info(USER_TOKEN).items():
            print(F'''{key}: {value}''')
    else:
        raise ValueError('\'USER_TOKEN\' field cannot be empty.')




import unittest

from transformers import DonutProcessor


_lowerCAmelCase  :      str			 ="""naver-clova-ix/donut-base"""

class __UpperCamelCase     (				unittest.TestCase		):






					'''simple docstring'''



					def    _UpperCAmelCase    (				self						):
						UpperCAmelCase__:	Any									= DonutProcessor.from_pretrained(lowerCamelCase__						)





					def    _UpperCAmelCase    (				self						):
						UpperCAmelCase__:	Any									= {
						    "name": "John Doe",
						    "age": "99",
						    "city": "Atlanta",
						    "state": "GA",
						    "zip": "30301",
						    "phone": "123-4567",
						    "nicknames": [{"nickname": "Johnny"}, {"nickname": "JD"}],
						}

						UpperCAmelCase__:	Optional[Any]									= (
						    "<s_name>John Doe</s_name><s_age>99</s_age><s_city>Atlanta</s_city>"
						    "<s_state>GA</s_state><s_zip>30301</s_zip><s_phone>123-4567</s_phone>"
						    "<s_nicknames><s_nickname>Johnny</s_nickname>"
						    "<sep/><s_nickname>JD</s_nickname></s_nicknames>"
						)
						UpperCAmelCase__:	str									= self.processor.tokenajson(lowerCamelCase__						)

						self.assertDictEqual(lowerCamelCase__				,      lowerCamelCase__						)