



from functools import lru_cache


@lru_cache
def 						UpperCAmelCase__   (   UpperCAmelCase__			:int       ):






 '''simple docstring'''

 if not isinstance(UpperCAmelCase__			,       UpperCAmelCase__       ):
  raise TypeError("k must be an integer."       )
 if k < 0:
  raise ValueError("k integer must be greater or equal to zero."       )
 if k == 0:
  return 0
 elif k == 1:
  return 1
 else:
  return fibonacci(k - 1       ) + fibonacci(k - 2       )


def 						UpperCAmelCase__   (   UpperCAmelCase__			:list			,       UpperCAmelCase__			:int       ):






 '''simple docstring'''

 a							=		len(UpperCAmelCase__       )
 # Find m such that F_m >= n where F_i is the i_th fibonacci number.
 a							=		0
 while True:
  if fibonacci(UpperCAmelCase__       ) >= len_list:
   a							=		i
   break
  i += 1
 a							=		0
 while fibb_k > 0:
  a							=		min(
      offset + fibonacci(fibb_k - 1       )			,       len_list - 1       )  # Prevent out of range
  a							=		arr[index_k]
  if item_k_1 == val:
   return index_k
  elif val < item_k_1:
   fibb_k -= 1
  elif val > item_k_1:
   offset += fibonacci(fibb_k - 1       )
   fibb_k -= 2
 else:
  return -1


if __name__ == "__main__":
     import doctest

     doctest.testmod()








import unittest
from pathlib import Path
from tempfile import TemporaryDirectory
from unittest.mock import Mock, patch

import diffusers.utils.hub_utils
class SCREAMING_SNAKE_CASE_    (       unittest.TestCase       ):






						@patch('diffusers.utils.hub_utils.get_full_repo_name'						)
						def UpperCAmelCase_					(   self   :   Optional[int]		, _A   :   Mock						)				->     None:







							"""simple docstring"""


							snake_case_		:      Optional[Any]           =						'full_repo_name'
							with TemporaryDirectory() as tmpdir:
								# Dummy args values
								snake_case_		:      Optional[int]           =						Mock()
								snake_case_		:      Union[str, Any]           =						tmpdir
								snake_case_		:      Optional[Any]           =						0
								snake_case_		:      Union[str, Any]           =						'hub_token'
								snake_case_		:      Any           =						'dataset_name'
								snake_case_		:      Tuple           =						0.0_1
								snake_case_		:      Dict           =						100000
								snake_case_		:      Any           =						10000
								snake_case_		:      str           =						0.0_1
								snake_case_		:      Any           =						0.0_2
								snake_case_		:      Optional[Any]           =						0.0_3
								snake_case_		:      Tuple           =						0.0_0_0_5
								snake_case_		:      Tuple           =						0.0_0_0_0_0_1
								snake_case_		:      str           =						1
								snake_case_		:      Optional[int]           =						10
								snake_case_		:      List[str]           =						0.0_0_1
								snake_case_		:      Any           =						0.1
								snake_case_		:      List[str]           =						0.2
								snake_case_		:      Dict           =						True

								# Model card mush be rendered and saved
								diffusers.utils.hub_utils.create_model_card(_A		, model_name='model_name'						)
								self.assertTrue((Path(_A						) / 'README.md').is_file()						)

