original_docstring: 
      wait until the virtual accelerator is available to me.
      
docstring: wait until the virtual accelerator is available to me.
docstring_tokens: wait until the virtual accelerator is available to me .
code: def _wait_for_lock(tag, maxwait=60):
      """
      wait until the virtual accelerator is available to me.
      """
      print("# Locking the mathine for userid=%d" % tag)
      if tag == 0:
          raise ValueError("you tag (=%d)  must be > 0." % tag)
  
      t0 = time.time()
      while caget('SVR:LOCKED') > 0:
          print("# waiting ... for user %d ..." % int(caget('SVR:LOCKED')))
          time.sleep(1)
          if time.time() - t0 > maxwait: break
  
      if caget('SVR:LOCKED') == 0:
          caput('SVR:LOCKED', tag)
      else:
          raise ValueError("can not get the writting permission to virtual accelerator")
code_tokens: def _wait_for_lock ( tag , maxwait = 60 ) : print ( "# Locking the mathine for userid=%d" % tag ) if tag == 0 : raise ValueError ( "you tag (=%d)  must be > 0." % tag ) t0 = time . time ( ) while caget ( 'SVR:LOCKED' ) > 0 : print ( "# waiting ... for user %d ..." % int ( caget ( 'SVR:LOCKED' ) ) ) time . sleep ( 1 ) if time . time ( ) - t0 > maxwait : break if caget ( 'SVR:LOCKED' ) == 0 : caput ( 'SVR:LOCKED' , tag ) else : raise ValueError ( "can not get the writting permission to virtual accelerator" )
short_docstring: wait until the virtual accelerator is available to me.
short_docstring_tokens: wait until the virtual accelerator is available to me .
comment: """
      wait until the virtual accelerator is available to me.
      """