def map_functions(stub_services)
      return @function_map unless @function_map.empty?

      stub_services.keys.each do |service_name|
        stub = @services[service_name] = stub_services[service_name]
        stub.class.to_s.gsub('::Stub', '::Service').constantize.rpc_descs.values.each do |d|
          next if d.name.to_sym == :Healthcheck

          grpc_func = ::GraphqlGrpc::Function.new(service_name, stub, d)
          if @function_map.key?(grpc_func.name)
            sn = @function_map[grpc_func.name].service_name
            STDERR.puts "Skipping method #{grpc_func.name}; it was already defined on #{sn}"
            # raise ConfigurationError, "#{grpc_func.name} was already defined on #{sn}."
          end
          @function_map[grpc_func.name] = grpc_func
        end
      end
      @function_map
    end
def map_functions(stub_services)
      return @function_map unless @function_map.empty?

      stub_services.keys.each do |service_name|
        stub = @services[service_name] = stub_services[service_name]
        stub.class.to_s.gsub('::Stub', '::Service').constantize.rpc_descs.values.each do |d|
          next if d.name.to_sym == :Healthcheck

          grpc_func = ::GraphqlGrpc::Function.new(service_name, stub, d)
          if @function_map.key?(grpc_func.name)
            sn = @function_map[grpc_func.name].service_name
            STDERR.puts "Skipping method #{grpc_func.name}; it was already defined on #{sn}"
            # raise ConfigurationError, "#{grpc_func.name} was already defined on #{sn}."
          end
          @function_map[grpc_func.name] = grpc_func
        end
      end
      @function_map
    end
Add to the function_map by inspecting each service for the RPCs it provides.