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: private_class_method_handler.rb
    path of file: ./repos/yard/lib/yard/handlers/ruby/legacy
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
# (see Ruby::PrivateClassMethodHandler)
class YARD::Handlers::Ruby::Lega
    
  def privatize_class_method(name)
    method = Proxy.new(namespace, name)
    ensure_loaded!(method)
    method.visibility = :private
  rescue YARD::Handlers::NamespaceMissingError
    raise UndocumentableError, "private visibility set on unrecognized method: #{name}"
  end