def extends(path_or_lambda, options = nil)
      if path_or_lambda.is_a?(Proc)
        @template.add_node Nodes::Polymorphic.new(path_or_lambda)
        return
      end

      other = Library.instance.compile_template_from_path(path_or_lambda, @view)

      if options && options.is_a?(Hash)
        @template.add_node Nodes::Extend.new(other.nodes, options[:locals])
      else
        @template.extends(other)
      end
    end
def extends(path_or_lambda, options = nil)
      if path_or_lambda.is_a?(Proc)
        @template.add_node Nodes::Polymorphic.new(path_or_lambda)
        return
      end

      other = Library.instance.compile_template_from_path(path_or_lambda, @view)

      if options && options.is_a?(Hash)
        @template.add_node Nodes::Extend.new(other.nodes, options[:locals])
      else
        @template.extends(other)
      end
    end
Extends an existing rabl template
 Example:
   extends 'users/base'
   extends ->(item) { "v1/#{item.class}/_core" }
   extends 'posts/base', locals: { hide_comments: true }