(func)
| 797 | |
| 798 | |
| 799 | def tf_required(func): |
| 800 | # Chose a different decorator name than in tests so it's clear they are not the same. |
| 801 | @wraps(func) |
| 802 | def wrapper(*args, **kwargs): |
| 803 | if is_tf_available(): |
| 804 | return func(*args, **kwargs) |
| 805 | else: |
| 806 | raise ImportError(f"Method `{func.__name__}` requires TF.") |
| 807 | |
| 808 | return wrapper |
nothing calls this directly
no outgoing calls
no test coverage detected