code: def dag_policy(dag: DAG) -> None:
      """
      Allow altering DAGs after they are loaded in the DagBag.
  
      It allows administrator to rewire some DAG's parameters.
      Alternatively you can raise ``AirflowClusterPolicyViolation`` exception
      to stop DAG from being executed.
  
      Here are a few examples of how this can be useful:
  
      * You could enforce default user for DAGs
      * Check if every DAG has configured tags
  
      :param dag: dag to be mutated
      """
  
file_path: airflow/airflow/policies.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING
  import pluggy
label_desc: Use image node_id 2 for calling a global function with example usage: dag_policy(dag) without return types