(*args, **kwargs)
| 192 | def _wrap_method_to_tensor_node(): |
| 193 | def _any_method(name, func): |
| 194 | def _any(*args, **kwargs): |
| 195 | if is_tracing_module() and _graph_surgery_mode(): |
| 196 | args, kwargs = _node_to_tensor(*args, **kwargs) |
| 197 | attr = getattr(args[0], name) |
| 198 | outs = attr |
| 199 | if callable(attr): |
| 200 | outs = attr(*(args[1:]), **kwargs) |
| 201 | if name == "__setitem__": |
| 202 | _node_to_tensor(outs) |
| 203 | return None |
| 204 | outs = _tensor_to_node(outs) |
| 205 | return outs |
| 206 | else: |
| 207 | outs = func |
| 208 | if callable(func): |
| 209 | outs = func(*args, **kwargs) |
| 210 | if isinstance(func, property): |
| 211 | outs = func.__get__(*args, **kwargs) |
| 212 | return outs |
| 213 | |
| 214 | return _any |
| 215 |
nothing calls this directly
no test coverage detected