title: xcom_pull is not working in dynamic task generation function
body: <p>I have a function which dynamically creates a sub task, where I am reading value from <code>xcom_pull</code> but there I am getting the error:</p>
  <pre><code>  File &quot;/home/airflow/gcs/recon_nik_v6.py&quot;, line 168, in create_audit_task
      my_dict=kwargs[&quot;ti&quot;].xcom_pull(task_ids='accept_input_from_cli', key='my_ip_dict')
  KeyError: 'ti'
  </code></pre>
  <p>If I use the same <code>my_dict=kwargs[&quot;ti&quot;].xcom_pull(task_ids='accept_input_from_cli', key='my_ip_dict')</code> code in another function then it works, but in this dynamic part it's not working.</p>