def _job_status(job):
    """Utility function that returns the status of a job

    :param job: job json
    :type job: json
    :rtype: str

    """

    if 'activeRuns' in job:
        return "Running"
    # short circuit will prevent failure
    elif 'schedules' not in job or not job['schedules']:
        return "Unscheduled"
    else:
        return "Scheduled"