example the inheritance relation between classes in python program forms tree when single inheritance is used for examplein section we provided summary of the hierarchy for python' exception typesas portrayed in figure (originally figure the baseexception class is the root of that hierarchywhile all user-defined exception classes should conventionally be declared as descendants of the more specific exception class (seefor examplethe empty class we introduced in code fragment of baseexception systemexit exception keyboardinterrupt lookuperror valueerror indexerror arithmeticerror keyerror zerodivisionerror figure portion of python' hierarchy of exception types in pythonall classes are organized into single hierarchyas there exists built-in class named object as the ultimate base class it is direct or indirect base class of all other types in python (even if not declared as such when defining new classthereforethe hierarchy pictured in figure is only portion of python' complete class hierarchy as preview of the remainder of this figure portrays our own hierarchy of classes for representing various forms of tree tree binarytree arraybinarytree linkedtree linkedbinarytree figure our own inheritance hierarchy for modeling various abstractions and implementations of tree data structures in the remainder of this we provide implementations of treebinarytreeand linkedbinarytree classesand highlevel sketches for how linkedtree and arraybinarytree might be designed