def METHOD_NAME(self, n_graphs: int = 100) -> NumpyDataset:
    """Samples graphs
    Parameters
    ----------
    n_graphs: int, default 100
        Number of graphs to generate
    Returns
    -------
    graphs: NumpyDataset
        Generated Graphs
    """
    graphs, labels = [], []
    for i in range(n_graphs):
        n_nodes = random.randint(self.min_nodes, self.max_nodes)
        edge_index = generate_edge_index(n_nodes, self.avg_degree)
        n_edges = edge_index.shape[1]
        if self.task == 'graph':
            graph_label = random.randint(0, self.n_classes - 1)
            node_features = np.random.rand(
                n_nodes, self.n_node_features) + graph_label
            edge_features = np.random.rand(
                n_edges, self.n_edge_features) + graph_label
            kwargs = {}
            for feature_name, feature_shape in self.kwargs.items():
                kwargs[feature_name] = np.random.rand(
                    1, feature_shape) + graph_label
            labels.append(graph_label)
        elif self.task == 'node':
            node_label = np.random.randint(0, self.n_classes - 1,
                                           n_nodes).astype(np.float64)
            node_features = np.random.rand(
                n_nodes, self.n_node_features) + node_label.reshape(-1, 1)
            # For a node-prediction task, label is not added to edge features and other global features
            # because label here is a node-level attribute and not a graph-level attribute
            edge_features = np.random.rand(n_edges, self.n_edge_features)
            kwargs = {}
            for feature_name, feature_shape in self.kwargs.items():
                kwargs[feature_name] = np.random.rand(1, feature_shape)
            kwargs['y'] = node_label
        graph = GraphData(node_features, edge_index, edge_features,
                          **kwargs)
        graphs.append(graph)
        if self.task == 'graph':
            graph_dataset = NumpyDataset(X=np.array(graphs),
                                         y=np.array(labels))
        elif self.task == 'node':
            # In this case, the 'y' attribute of GraphData will contain the
            # node-level labels.
            graph_dataset = NumpyDataset(X=np.array(graphs))
    return graph_dataset