def tree_merge_class(self, dst, src):
        if isinstance(src.children[0], Leaf) and \
           src.children[0].value == 'class' and \
           isinstance(src.children[1], Leaf) and \
           isinstance(src.children[-1], Node):
            class_name = src.children[1].value
            if type_repr(src.children[-1].type) == 'suite':
                src_children = src.children[-1].children
            else:
                src_children = [src.children[-1]]
        else:
            raise self.TranslationError(
                "Cannot merge class %r" % src
            )
        for dst_child in dst.children:
            if type_repr(dst_child.type) == 'classdef' and \
               dst_child.children[0].value == 'class' and \
               isinstance(dst_child.children[1], Leaf) and \
               dst_child.children[1].value == class_name and \
               isinstance(dst_child.children[-1], Node) and \
               type_repr(dst_child.children[-1].type) == 'suite':
                dst_node = dst_child.children[-1]
                for src_child in src_children:
                    if type_repr(src_child.type) == 'funcdef':
                        self.tree_replace_function(dst_node, src_child)
                    elif type_repr(src_child.type) == 'simple_stmt':
                        self.tree_replace_stmt(dst_node, src_child)
                return
        raise self.TranslationError(
            class_name % "Cannot find class %r for merge"
        )
dataset/ETHPy150Open anandology/pyjamas/pyjs/src/pyjs/translator_dict.py/Translator.tree_merge_class/swapped operands of `%`