code: def is_device_locked(device_id):
      try:
          with device_lock(device_id, timeout=0.000001):
              return False
      except filelock.Timeout:
          return True
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import inspect
  import hashlib
  import filelock
  import errno
  import os
  import sys
  import shutil
  import traceback
label_desc: Use image node_id 9 for calling a global function with example usage: is_device_locked(device_id) and returns: False, True