src/transformers/testing_utils.py
def require_ray(test_case):
    """
    Decorator marking a test that requires Ray/tune.

    These tests are skipped when Ray/tune isn't installed.

    """
    if not is_ray_available():
        return unittest.skip("test requires Ray/tune")(test_case)
    else:
        return test_case

    Decorator marking a test that requires Ray/tune.

    These tests are skipped when Ray/tune isn't installed.

    
Decorator marking a test that requires Ray/tune.
These tests are skipped when Ray/tune isn't installed.
Decorator marking a test that requires Ray / tune . These tests are skipped when Ray / tune isn ' t installed .
def require_ray(test_case):
    if not is_ray_available():
        return unittest.skip("test requires Ray/tune")(test_case)
    else:
        return test_case
def require_ray ( test_case ) : if not is_ray_available ( ) : return unittest . skip ( "test requires Ray/tune" ) ( test_case ) else : return test_case
Decorator marking a test that requires Ray/tune.
Decorator marking a test that requires Ray / tune .
"""
    Decorator marking a test that requires Ray/tune.

    These tests are skipped when Ray/tune isn't installed.

    """
test_case