Currently the operator allows to set requirement as list that needs to be hard coded.
It would be nice if airflow can support reading from file directly (something similar to how operators read sql file)
tests/operators/test_python.py
dr = self.dag.create_dagrun(
            run_type=DagRunType.MANUAL,
            start_date=timezone.utcnow(),
            execution_date=DEFAULT_DATE,
            state=State.RUNNING,
        )
        branch_op.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
        for task in branches:
            task.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
        tis = dr.get_task_instances()
        for ti in tis:
            if ti.task_id == 'make_choice':
                assert ti.state == State.SUCCESS
            elif ti.task_id == 'branch_1':
                assert ti.state == State.SUCCESS
            elif ti.task_id == 'branch_2':
                assert ti.state == State.SKIPPED
            else:
                raise ValueError(f'Invalid task id {ti.task_id} found!')
        children_tis = [ti for ti in tis if ti.task_id in branch_op.get_direct_relative_ids()]
        
        with create_session() as session:
            clear_task_instances(children_tis, session=session, dag=self.dag)
        
        for task in branches:
            task.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
        
        for ti in dr.get_task_instances():
            if ti.task_id == 'make_choice':
                assert ti.state == State.SUCCESS