for x in range(value):
    bash_cmd = 'echo B{}'.format(x)
task_operator = BashOperator(bash_command=bash_cmd, task_id='B*{}'.format(x
    ), dag=dag)
return dag
Proper way to create dynamic workflows in Airflow