def validate_options(options, raise_error_if_unrecognized = true)
      keys = []
      for key, value in options
        unless value.nil?
          keys << key
        end
      end

      missing = requirements - keys
      unless missing.empty?
        raise ArgumentError, "Missing required arguments: #{missing.map(&:to_s).sort.join(', ')}"
      end

      if !recognizes.empty? && raise_error_if_unrecognized
        unrecognized = options.keys - requirements - recognized
        unless unrecognized.empty?
          raise ArgumentError, "Unrecognized arguments: #{unrecognized.map(&:to_s).sort.join(', ')}"
        end
      end
    end
def validate_options(options, raise_error_if_unrecognized = true)
      keys = []
      for key, value in options
        unless value.nil?
          keys << key
        end
      end

      missing = requirements - keys
      unless missing.empty?
        raise ArgumentError, "Missing required arguments: #{missing.map(&:to_s).sort.join(', ')}"
      end

      if !recognizes.empty? && raise_error_if_unrecognized
        unrecognized = options.keys - requirements - recognized
        unless unrecognized.empty?
          raise ArgumentError, "Unrecognized arguments: #{unrecognized.map(&:to_s).sort.join(', ')}"
        end
      end
    end
Ensures that required arguments are present and that optional arguments
 are recognized.

 @param [Hash] options arguments
 @raise [ArgumentError] if it can't find a required argument or can't
   recognize an optional argument
 @see Fog::Service::validate_options