def METHOD_NAME(self, n):
    for _ in range(n):
        num_v = np.random.randint(self.min_num_v, self.max_num_v)
        assert num_v >= 4, (
            "We require a grid graph to contain at least two "
            "rows and two columns, thus 4 nodes, got {:d} "
            "nodes".format(num_v)
        )
        n_rows = np.random.randint(2, num_v // 2)
        n_cols = num_v // n_rows
        g = nx.grid_graph([n_rows, n_cols])
        g = nx.convert_node_labels_to_integers(g)
        self.graphs.append(g)
        self.labels.append(5)