'Returns the Dag associated with this DagRun.
:return: DAG'

def get_dag(self):

    if (not self.dag):
        raise AirflowException(u'The    DAG    (.dag)    for    {}    needs    to    be    set'.format(self))
    return self.dag
