docs: def _get_job_status(line):
    """magic used as an endpoint for client to get job status.
  
         %_get_job_status <name>
  
    Returns:
      A JSON object of the job status.
    """
    try:
      args = line.strip().split()
      job_name = args[0]
  
      job = None
      if job_name in _local_jobs:
        job = _local_jobs[job_name]
      else:
        raise Exception('invalid job %s' % job_name)
  
      if job is not None:
        error = '' if job.fatal_error is None else str(job.fatal_error)
        data = {'exists': True, 'done': job.is_complete, 'error': error}
      else:
        data = {'exists': False}
  
    except Exception as e:
      google.datalab.utils.print_exception_with_last_stack(e)
      data = {'done': True, 'error': str(e)}
  
    return IPython.core.display.JSON(data)