def model_classes(classes = Map.model_classes)
      nested_hash = classes.each_with_object({}) do |klass, hash|
        hash[klass] = Node.new(klass)
      end
      nested_hash.each do |klass, node|
        node.parent = parent = nested_hash[klass.superclass]
        parent.children << node if parent
      end
      nested_hash.values.select { |v| v.parent.nil? }
    end
def model_classes(classes = Map.model_classes)
      nested_hash = classes.each_with_object({}) do |klass, hash|
        hash[klass] = Node.new(klass)
      end
      nested_hash.each do |klass, node|
        node.parent = parent = nested_hash[klass.superclass]
        parent.children << node if parent
      end
      nested_hash.values.select { |v| v.parent.nil? }
    end
Turn a list of classes into tree structure by inheritance.
 @param classes [Array<Class>]
   a list of all the classes that wallaby supports
 @return [Array<Wallaby::Node>] a tree structure of given classes