labscript.utils.is_remote_connection

is_remote_connection(connection)[source]

Returns whether the connection is an instance of _RemoteConnection

This function defers and caches the import of _RemoteConnection. This both breaks the circular import between Device and _RemoteConnection, while maintaining reasonable performance (this performs better than importing each time as the lookup in the modules hash table is slower).