def juju_job_labels(job, num=0):
    """Fetch job labels.

    Args:
        job: a list of static scrape jobs
        num: index of static config for which labels must be extracted.

    Returns:
        a dictionary of job labels for the first static job.
    """
    static_config = job["static_configs"][num]
    return static_config["labels"]