def normalize_selector(value, name)
      if (str = selector_to_str(value))
        return str
      end

      err = "#{value.inspect} is not a valid selector: it must be a string,\n" +
        "a list of strings, or a list of lists of strings"
      err = "$#{name.to_s.tr('_', '-')}: #{err}" if name
      raise ArgumentError.new(err)
    end
def normalize_selector(value, name)
      if (str = selector_to_str(value))
        return str
      end

      err = "#{value.inspect} is not a valid selector: it must be a string,\n" +
        "a list of strings, or a list of lists of strings"
      err = "$#{name.to_s.tr('_', '-')}: #{err}" if name
      raise ArgumentError.new(err)
    end
Converts a user-provided selector into string form or throws an
 ArgumentError if it's in an invalid format.