def copy_filter(filter)
      buffer = {exclude: {}, include: {}}

      filter[:exclude].each do |part|
        buffer[:exclude][part[0]] = part[1].dup
      end

      filter[:include].each do |part|
        buffer[:include][part[0]] = part[1].dup
      end

      return buffer
    end
def copy_filter(filter)
      buffer = {exclude: {}, include: {}}

      filter[:exclude].each do |part|
        buffer[:exclude][part[0]] = part[1].dup
      end

      filter[:include].each do |part|
        buffer[:include][part[0]] = part[1].dup
      end

      return buffer
    end
Copies a filter
 @return [Hash]