def has_dag(self):
        return getattr(self, '_dag', None) is not None
Returns True if the Operator has been assigned to a DAG.
dataset/ETHPy150Open airbnb/airflow/airflow/models.py/BaseOperator.has_dag