def push_function():
    return value

def pull_function(**context):
    value = context['task_instance'].xcom_pull(task_ids='pushing_task')
push_task = PythonOperator(task_id='pushing_task', provide_context=True,
    python_callable=pushing_task, trigger_rule='all_done', dag=dag)
Proper way to create dynamic workflows in Airflow