Python bitshift 运算符如何转换为 Airflow 中的 set_downstream 和 set_upstream 功能

How does Python bitshift opeartors translate to set_downstream and set_upstream functionality in Airflow

我想了解 Python 移位运算符 >><< 如何用于定义 Airflow 中的运算符关系。我无法弄清楚可用于使用移位运算符转换 set_upstream() 和 set_downstream() 方法功能的逻辑。如果有人还可以将我指向 Airflow 代码库中的相关模块,那将会很有帮助。

what makes       op1 >> op2 >> op3 << op4

equivalent to    op1.set_downstream(op2)
                 op2.set_downstream(op3)
                 op3.set_upstream(op4)

>><< 被翻译成相关对象的 __lshift__/__rlshift__ and __rshift__/__rrshift__ methods

It will be helpful if someone can also point me to the relevant module in the Airflow code repo.

定义为models.py, by the way. And the line of relevance is where the __rshift__, __lshift__, __rrshift__ and __rlshift__ operators are defined的相关模块,即>><<转换成的方法。