def insert(to_add, after: nil, before: nil)
      if after && before || !after && !before
        raise ArgumentError, 'either :after or :before keys should be passed'
      end
      matcher = after || before
      matcher_proc = if matcher.is_a?(Proc)
                       __to_matcher(&matcher)
                     else
                       __to_matcher(matcher)
                     end
      node = each_node.find(&matcher_proc)
      return unless node
      new_node = after ? insert_after_node(to_add, node) : insert_before_node(to_add, node)
      new_node.data
    end
def insert(to_add, after: nil, before: nil)
      if after && before || !after && !before
        raise ArgumentError, 'either :after or :before keys should be passed'
      end
      matcher = after || before
      matcher_proc = if matcher.is_a?(Proc)
                       __to_matcher(&matcher)
                     else
                       __to_matcher(matcher)
                     end
      node = each_node.find(&matcher_proc)
      return unless node
      new_node = after ? insert_after_node(to_add, node) : insert_before_node(to_add, node)
      new_node.data
    end
Inserts after or before first matched node.data from the the list by passed block or value.

 == Returns:
 Inserted node data