You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: api_version_request_handling.rb
    path of file: ./repos/chef/lib/chef/mixin
    
    the code of the file until where you have to start completion: #
# Author:: Tyler Cloke (tyler@chef.io)
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache L
    
      def server_client_api_version_intersection(exception, supported_client_versions)
        # return empty array unless 406 Unacceptable with proper header
        return nil if exception.response.code != "406" || exception.response["x-ops-server-api-version"].nil?

        # intersection of versions the server and client support, will be of length zero if no intersection
        server_supported_client_versions = []

        header = Chef::JSONCompat.from_json(exception.response["x-ops-server-api-version"])
        min_server_version = Integer(header["min_version"])
        max_server_version = Integer(header["max_version"])

        supported_client_versions.each do |version|
          if version >= min_server_version && version <= max_server_version
            server_supported_client_versions.push(version)
          end
        end