




import pytest

from datasets import inspect_metric, list_metrics, load_metric




@pytest.fixture
def 						SCREAMING_SNAKE_CASE__ (   lowercase					)  ->       List[str]:
			monkeypatch.setattr("""datasets.utils.deprecation_utils._emitted_deprecation_warnings"""						,set()					)




@pytest.fixture
def 						SCREAMING_SNAKE_CASE__ (   lowercase					)  ->       int:




			class 						__lowercase		:




									"""simple docstring"""





									def __init__(				self    ,				A     )		->    str:
												snake_case				:    Optional[int]           =	metric_id




			class 						__lowercase		:




									"""simple docstring"""





									_snake_case												=						[MetricMock(UpperCamelCase__							) for metric_id in ["""accuracy""", """mse""", """precision""", """codeparrot/apps_metric"""]]

									def      UpperCAmelCase				(				self     )		->    List[str]:
												return self._metrics




			monkeypatch.setattr("""datasets.inspect.huggingface_hub"""						,HfhMock()					)




@pytest.mark.parametrize(
    """func, args"""						,[(load_metric, ("""metrics/mse""",)), (list_metrics, ()), (inspect_metric, ("""metrics/mse""", """tmp_path"""))]					)
def 						SCREAMING_SNAKE_CASE__ (   lowercase						,lowercase						,lowercase						,lowercase						,lowercase					)  ->       Any:
			if "tmp_path" in args:
						snake_case				:    str           =	tuple(arg if arg != """tmp_path""" else tmp_path for arg in args					)
			with pytest.warns(lowercase						,match="""https://huggingface.co/docs/evaluate"""					):
						func(*lowercase					)











def 						SCREAMING_SNAKE_CASE__ (   lowercase						,lowercase					)  ->       int:
   return int((input_a, input_a).count(1					) != 0					)




def 						SCREAMING_SNAKE_CASE__ (   )  ->       None:
   assert or_gate(0						,0					) == 0
   assert or_gate(0						,1					) == 1
   assert or_gate(1						,0					) == 1
   assert or_gate(1						,1					) == 1


if __name__ == "__main__":
       print(or_gate(0, 1))
       print(or_gate(1, 0))
       print(or_gate(0, 0))
       print(or_gate(1, 1))





