title: How does Airflow's BranchPythonOperator work?
body: <p>I'm struggling to understand how BranchPythonOperator in Airflow works. I know it's primarily used for branching, but am confused by the documentation as to what to pass into a task and what I need to pass/expect from the task upstream. </p>
  
  <p>Given the simple example in the documentation <a href="https://airflow.incubator.apache.org/concepts.html#branching" rel="noreferrer">on this page</a> what would the source code look like for the upstream task called <code>run_this_first</code> and the 2 downstream ones that are branched? How exactly does Airflow know to run <code>branch_a</code> instead of <code>branch_b</code>? Where does the upstream task's` output get noticed/read?</p>