def _get_binop_flow(<EOL>left, left_type, binary_opnode, right, right_type, context, reverse_context<EOL>):
op = binary_opnode.op<EOL>if _same_type(left_type, right_type):<EOL><INDENT>methods = [_bin_op(left, binary_opnode, op, right, context)]<EOL><DEDENT>elif helpers.is_subtype(left_type, right_type):<EOL><INDENT>methods = [_bin_op(left, binary_opnode, op, right, context)]<EOL><DEDENT>elif helpers.is_supertype(left_type, right_type):<EOL><INDENT>methods = [<EOL>_bin_op(right, binary_opnode, op, left, reverse_context, reverse=True),<EOL>_bin_op(left, binary_opnode, op, right, context),<EOL>]<EOL><DEDENT>else:<EOL><INDENT>methods = [<EOL>_bin_op(left, binary_opnode, op, right, context),<EOL>_bin_op(right, binary_opnode, op, left, reverse_context, reverse=True),<EOL>]<EOL><DEDENT>return methods<EOL>
Get the flow for binary operations.

    The rules are a bit messy:

        * if left and right have the same type, then only one
          method will be called, left.__op__(right)
        * if left and right are unrelated typewise, then first
          left.__op__(right) is tried and if this does not exist
          or returns NotImplemented, then right.__rop__(left) is tried.
        * if left is a subtype of right, then only left.__op__(right)
          is tried.
        * if left is a supertype of right, then right.__rop__(left)
          is first tried and then left.__op__(right)