





import pytest

import datasets.config
from datasets.utils.info_utils import is_small_dataset




@pytest.mark.parametrize("dataset_size"  ,    [None, 4_0_0 * 2**2_0, 6_0_0 * 2**2_0]  )
@pytest.mark.parametrize("input_in_memory_max_size"  ,    ["default", 0, 1_0_0 * 2**2_0, 9_0_0 * 2**2_0]  )
def     a__ (					lowercase__  ,    lowercase__  ,    lowercase__  ):






   '''simple docstring'''






   if input_in_memory_max_size != "default":
      monkeypatch.setattr(datasets.config  ,    "IN_MEMORY_MAX_SIZE"  ,    lowercase__  )
   UpperCAmelCase_											=datasets.config.IN_MEMORY_MAX_SIZE
   if input_in_memory_max_size == "default":
      assert in_memory_max_size == 0
   else:
      assert in_memory_max_size == input_in_memory_max_size
   if dataset_size and in_memory_max_size:
      UpperCAmelCase_											=dataset_size < in_memory_max_size
   else:
      UpperCAmelCase_											=False
   UpperCAmelCase_											=is_small_dataset(lowercase__  )
   assert result == expected











__lowercase  :   Optional[Any]						      =[
    (1000, """M"""),
    (900, """CM"""),
    (500, """D"""),
    (400, """CD"""),
    (100, """C"""),
    (90, """XC"""),
    (50, """L"""),
    (40, """XL"""),
    (10, """X"""),
    (9, """IX"""),
    (5, """V"""),
    (4, """IV"""),
    (1, """I"""),
]




def     a__ (					lowercase__  ):






   '''simple docstring'''






   UpperCAmelCase_											={"I": 1, "V": 5, "X": 1_0, "L": 5_0, "C": 1_0_0, "D": 5_0_0, "M": 1_0_0_0}
   UpperCAmelCase_											=0
   UpperCAmelCase_											=0
   while place < len(lowercase__  ):
      if (place + 1 < len(lowercase__  )) and (vals[roman[place]] < vals[roman[place + 1]]):
         total += vals[roman[place + 1]] - vals[roman[place]]
         place += 2
      else:
         total += vals[roman[place]]
         place += 1
   return total




def     a__ (					lowercase__  ):






   '''simple docstring'''






   UpperCAmelCase_											=[]
   for arabic, roman in ROMAN:
      ((UpperCAmelCase_)						,       (UpperCAmelCase_))											=divmod(lowercase__  ,    lowercase__  )
      result.append(roman * factor  )
      if number == 0:
         break
   return "".join(lowercase__  )


if __name__ == "__main__":
     import doctest

     doctest.testmod()




