code: def poll_for_server_running(job_id):
      
      sys.stdout.write('Waiting for server in {0} to initialize ...'.format(job_id))
      sys.stdout.flush()
      desc = dxpy.describe(job_id)
      # Keep checking until the server has begun or it has failed.
      while(SERVER_READY_TAG not in desc['tags'] and desc['state'] != 'failed'):
          time.sleep(SLEEP_PERIOD)
          sys.stdout.write('.')
          sys.stdout.flush()
          desc = dxpy.describe(job_id)
  
      # If the server job failed, provide friendly advice.
      if desc['state'] == 'failed':
          msg = RED('Error:') + ' Server failed to run.\n'
          msg += 'You may want to check the job logs by running:'
          msg += BOLD('dx watch {0}'.format(job_id))
          err_exit(msg)
docs: Poll for the job to start running and post the SERVER_READY_TAG.