class SchemaNode {
        private final LiquibaseSchema item;

        private final Collection<SchemaNode> children = new ArrayList<>();

        public SchemaNode(LiquibaseSchema item) {
            this.item = item;
        }

        public LiquibaseSchema getItem() {
            return item;
        }

        public Collection<SchemaNode> getChildren() {
            return Collections.unmodifiableCollection(children);
        }

        public void addChild(LiquibaseSchema child) {
            children.add(new SchemaNode(child));
        }

        public SchemaNode find(String name) {<FILL_FUNCTION_BODY>}

        public List<LiquibaseSchema> toList() {
            List<LiquibaseSchema> list = new ArrayList<>(children.size() + 1);
            list.add(item);
            for (SchemaNode child : children) {
                list.addAll(child.toList());
            }
            return list;
        }
    }

            SchemaNode result = null;
            if (this.item.name().equals(name)) {
                result = this;
            } else {
                for (SchemaNode child : children) {
                    SchemaNode found = child.find(name);
                    if ((result == null) && (found != null)) {
                        result = child.find(name);
                    } else if ((result != null) && (found != null)) {
                        throw new IllegalStateException(String.format(
                                "Duplicate schema names [%s] detected!",
                                result.getItem().name()));
                    }
                }
            }

            return result;
        
<no_super_class>