You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: search.rb
    path of file: ./repos/psd.rb/lib/psd/nodes
    
    the code of the file until where you have to start completion: class PSD
  module Node
    module Search
      def find_by_id(id)
        subtree.select { |n| n.id == id }.first
      end

      # Searches the tree structure for a node at the given path. The path is
      # defin
    
      def children_at_path(path, opts={})
        path = path.split('/').delete_if { |p| p == "" } unless path.is_a?(Array)

        path = path.dup
        query = path.shift
        matches = children.select do |c|
          if opts[:case_sensitive]
            c.name == query
          else
            c.name.downcase == query.downcase
          end
        end