(*args, **kwargs)
| 788 | # Chose a different decorator name than in tests so it's clear they are not the same. |
| 789 | @wraps(func) |
| 790 | def wrapper(*args, **kwargs): |
| 791 | if is_torch_available(): |
| 792 | return func(*args, **kwargs) |
| 793 | else: |
| 794 | raise ImportError(f"Method `{func.__name__}` requires PyTorch.") |
| 795 | |
| 796 | return wrapper |
| 797 |
nothing calls this directly
no test coverage detected