def METHOD_NAME(g, ego_number, hop_number, sampling):
    ego_number = min(ego_number, g.num_nodes)
    num_graphs = ego_number
    num_features = g.num_node_features
    num_labels = len(g.y.unique())
    # sample central nodes
    # nodes are names as 0, 1, 2, ...
    if sampling == 'random':
        egos = random.sample(range(g.num_nodes), ego_number)
        egonetworks = [_to_egoNet(g, ego, hop_number) for ego in egos]
    if sampling == 'byLabel':
        egos_byLabel = {}
        allLabels = g.y.unique()
        for label in allLabels:
            idx_label = np.where(g.y == label)[0]
            egos_byLabel[label.item()] = random.sample(list(idx_label), ego_number)    # ego_number is per client in this case (should be smaller)
        egonetworks = {k: [_to_egoNet(g, ego.item(), hop_number) for ego in v] for k, v in egos_byLabel.items()}
        num_graphs = len(allLabels) * ego_number
    return egonetworks, num_graphs, num_features, num_labels