def METHOD_NAME(attributes=None, client=None, job_ref=None):
    """Compiles attributes from: client, job_ref, user-provided attributes.
    Attributes from all of these sources are merged together. Note the
    attributes are added sequentially based on perceived order of precendence:
    i.e. attributes added last may overwrite attributes added earlier.
    Args:
        attributes (Optional[dict]):
            Additional attributes that pertain to
            the specific API call (i.e. not a default attribute)
        client (Optional[google.cloud.bigquery.client.Client]):
            Pass in a Client object to extract any attributes that may be
            relevant to it and add them to the final_attributes
        job_ref (Optional[google.cloud.bigquery.job._AsyncJob])
            Pass in a _AsyncJob object to extract any attributes that may be
            relevant to it and add them to the final_attributes.
    Returns: dict
    """
    collected_attributes = _default_attributes.copy()
    if client:
        collected_attributes.update(_set_client_attributes(client))
    if job_ref:
        collected_attributes.update(_set_job_attributes(job_ref))
    if attributes:
        collected_attributes.update(attributes)
    final_attributes = {k: v for k, v in collected_attributes.items() if v is not None}
    return final_attributes