class_docstr: Translate Airflow metadata to OpenLineage events instead of creating them from Airflow code.
class_docstr_tok: ["Translate","Airflow","metadata","to","OpenLineage","events","instead","of","creating","them","from","Airflow","code","."]
code: def _build_job(
      job_name: str,
      job_description: str | None = None,
      code_location: str | None = None,
      owners: list[str] | None = None,
      job_facets: dict[str, BaseFacet] | None = None,
  ):
      facets: dict[str, BaseFacet] = {}
  
      if job_description:
          facets.update(
              {
                  "documentation": DocumentationJobFacet(
                      description=job_description
                  )
              }
          )
      if code_location:
          facets.update(
              {
                  "sourceCodeLocation": SourceCodeLocationJobFacet(
                      "", url=code_location
                  )
              }
          )
      if owners:
          facets.update(
              {
                  "ownership": OwnershipJobFacet(
                      owners=[
                          OwnershipJobFacetOwners(name=owner)
                          for owner in owners
                      ]
                  )
              }
          )
      if job_facets:
          facets = {**facets, **job_facets}
  
      return Job(_DAG_NAMESPACE, job_name, facets)
  
imports: from __future__ import annotations
  import os
  import uuid
  from typing import TYPE_CHECKING
  import yaml
  from openlineage.client import OpenLineageClient, set_producer
  from openlineage.client.facet import BaseFacet, DocumentationJobFacet, ErrorMessageRunFacet, NominalTimeRunFacet, OwnershipJobFacet, OwnershipJobFacetOwners, ParentRunFacet, ProcessingEngineRunFacet, SourceCodeLocationJobFacet
  from openlineage.client.run import Job, Run, RunEvent, RunState
  from airflow.configuration import conf
  from airflow.providers.openlineage import __version__
  from airflow.providers.openlineage.utils.utils import OpenLineageRedactor
  from airflow.stats import Stats
  from airflow.utils.log.logging_mixin import LoggingMixin
label_desc: Use image node_id 15 for calling the OpenLineageAdapter obj's underlying member method code with example usage: obj._build_job(job_name, job_description, code_location, owners, job_facets) and returns: Job