def __init__(self, model1, model2):
        '''
        __init__ instantiates a Model instance.
        '''

        self.model1 = model1
        self.model2 = model2
        self.width = {}
        if model1.tree.tag == model2.tree.tag:
            self.tree = etree.Element(model1.tree.tag)
            if id(self.model1) != id(self.model2):
                self.compare_nodes(model1.tree, model2.tree, self.tree)
        else:
            raise ValueError("cannot generate diff of different modules: " \
                             "'{}' vs '{}'" \
                             .format(model1.tree.tag, model2.tree.tag))
def __init__ ( self , model1 , model2 ) : self . model1 = model1 self . model2 = model2 self . width = { } if model1 . tree . tag == model2 . tree . tag : self . tree = etree . Element ( model1 . tree . tag ) if id ( self . model1 ) != id ( self . model2 ) : self . compare_nodes ( model1 . tree , model2 . tree , self . tree ) else : raise ValueError ( "cannot generate diff of different modules: " "'{}' vs '{}'" . format ( model1 . tree . tag , model2 . tree . tag ) )
__init__ instantiates a Model instance.