(typingctx, self, other)
return ret_type(self, other), codegen
This function gets two multi_index objects each represented as
    Tuple(levels) and Tuple(codes) and repacks these into Tuple of following
    elements (self_level_0, self_codes_0, other_level_0, other_codes_0), etc
This function gets two multi_index objects each represented as
    Tuple(levels) and Tuple(codes) and repacks these into Tuple of following
    elements (self_level_0, self_codes_0, other_level_0, other_codes_0), etc
This function gets two multi_index objects each represented as Tuple ( levels ) and Tuple ( codes ) and repacks these into Tuple of following elements ( self_level_0 self_codes_0 other_level_0 other_codes_0 ) etc
def _multi_index_binop_helper(typingctx, self, other):
    """ This function gets two multi_index objects each represented as
    Tuple(levels) and Tuple(codes) and repacks these into Tuple of following
    elements (self_level_0, self_codes_0, other_level_0, other_codes_0), etc
    """

    nlevels = len(self.levels)
    if not len(self.levels) == len(other.levels):
        assert True, "Cannot flatten MultiIndex of different nlevels"

    elements_types = zip(self.levels, self.codes, other.levels, other.codes)
    ret_type = types.Tuple([types.Tuple.from_types(x) for x in elements_types])

    def codegen(context, builder, sig, args):
        self_val, other_val = args

        self_ctinfo = cgutils.create_struct_proxy(self)(
                    context, builder, value=self_val)
        self_levels = self_ctinfo.levels
        self_codes = self_ctinfo.codes

        other_ctinfo = cgutils.create_struct_proxy(other)(
                    context, builder, value=other_val)
        other_levels = other_ctinfo.levels
        other_codes = other_ctinfo.codes

        ret_tuples = []
        for i in range(nlevels):
            self_level_i = builder.extract_value(self_levels, i)
            self_codes_i = builder.extract_value(self_codes, i)
            other_level_i = builder.extract_value(other_levels, i)
            other_codes_i = builder.extract_value(other_codes, i)

            ret_tuples.append(
                context.make_tuple(builder,
                                   ret_type[i],
                                   [self_level_i, self_codes_i, other_level_i, other_codes_i])
            )

            if context.enable_nrt:
                context.nrt.incref(builder, ret_type[i][0], self_level_i)
                context.nrt.incref(builder, ret_type[i][1], self_codes_i)
                context.nrt.incref(builder, ret_type[i][2], other_level_i)
                context.nrt.incref(builder, ret_type[i][3], other_codes_i)

        res = context.make_tuple(builder, ret_type, ret_tuples)
        return res

    return ret_type(self, other), codegen
def _multi_index_binop_helper ( typingctx , self , other ) : nlevels = len ( self . levels ) if not len ( self . levels ) == len ( other . levels ) : assert True , "Cannot flatten MultiIndex of different nlevels" elements_types = zip ( self . levels , self . codes , other . levels , other . codes ) ret_type = types . Tuple ( [ types . Tuple . from_types ( x ) for x in elements_types ] ) def codegen ( context , builder , sig , args ) : self_val , other_val = args self_ctinfo = cgutils . create_struct_proxy ( self ) ( context , builder , value = self_val ) self_levels = self_ctinfo . levels self_codes = self_ctinfo . codes other_ctinfo = cgutils . create_struct_proxy ( other ) ( context , builder , value = other_val ) other_levels = other_ctinfo . levels other_codes = other_ctinfo . codes ret_tuples = [ ] for i in range ( nlevels ) : self_level_i = builder . extract_value ( self_levels , i ) self_codes_i = builder . extract_value ( self_codes , i ) other_level_i = builder . extract_value ( other_levels , i ) other_codes_i = builder . extract_value ( other_codes , i ) ret_tuples . append ( context . make_tuple ( builder , ret_type [ i ] , [ self_level_i , self_codes_i , other_level_i , other_codes_i ] ) ) if context . enable_nrt : context . nrt . incref ( builder , ret_type [ i ] [ 0 ] , self_level_i ) context . nrt . incref ( builder , ret_type [ i ] [ 1 ] , self_codes_i ) context . nrt . incref ( builder , ret_type [ i ] [ 2 ] , other_level_i ) context . nrt . incref ( builder , ret_type [ i ] [ 3 ] , other_codes_i ) res = context . make_tuple ( builder , ret_type , ret_tuples ) return res return ret_type ( self , other ) , codegen