Project: 030_Subgraph_Federated_Learning_for_Local_Generalizati | Function: update (iclr)

system: You are an expert Python programmer implementing algorithms from scientific papers.
Complete the masked function based on the algorithm description.
Follow Python best practices and maintain consistent code style.
Return **only** the complete Python function code.

user: Complete this Python function:

**DESCRIPTION:** Server-side global aggregation function that implements weighted averaging of local model parameters and generates global synthetic data by condensing reliable head degree and head class knowledge from all clients with class-wise weighting.

**KEY TERMS:** {
  "global_cls_rate": "rc k class proportion weighting",
  "weighted_global_syn": "global synthetic node features",
  "merged_global_graph": "aggregated knowledge from all clients",
  "cd_graphs": "condensed graphs from local clients"
}

**CONTEXT CODE:** import torch
from utils import average_parameters, merge_graphs_ht_proto
import copy
import numpy as np
import torch.nn.functional as F
from torch_geometric.data import Data

class Server(torch.nn.Module):
    def __init__(self, local_graphs, args):
        super().__init__()
        self.args = args
        self.cache = None

    def dict_init(self, global_dict):
        global_dict['cd_graphs'] = {}
        global_dict['train_results'] = {}
        global_dict['valid_results'] = {}
        global_dict['test_results'] = {}
        global_dict['client_weights'] = {}
        global_dict['server_weights'] = {}
        global_dict['NeighGen_pre_weights'] = {}
        global_dict['NeighGen_cls_weights'] = {}
        global_dict['Server_NeighGen_cls_weights'] = {}
        global_dict['cd_scaler'] = {}
        global_dict['global_synthetic_data'] = {}

    def end_round(self, global_dict):
        global_dict['cd_graphs'] = {}
        global_dict['train_results'] = {}
        global_dict['valid_results'] = {}
        global_dict['test_results'] = {}
        global_dict['client_weights'] = {}
        global_dict['NeighGen_pre_weights'] = {}
        global_dict['NeighGen_cls_weights'] = {}
        global_dict['Server_NeighGen_cls_weights'] = {}
        global_dict['cd_scaler'] = {}
        global_dict['global_synthetic_data'] = {}

    def get_parameters(self):
        return 0

    def update(self, gpu, global_dict, cur_round, num_cls):
        raise NotImplementedError("Function implementation has been masked for testing")

Complete the function implementation replacing "raise NotImplementedError".