Checks whether a device stack contains a callable.
(device_stack)
| 980 | |
| 981 | |
| 982 | def device_stack_has_callable(device_stack): |
| 983 | """Checks whether a device stack contains a callable.""" |
| 984 | return any(callable(spec._device_name_or_function) # pylint: disable=protected-access |
| 985 | for spec in device_stack.peek_objs()) |
| 986 | |
| 987 | |
| 988 | def check_mutation(n1, n2): |