def METHOD_NAME(self, model, num_samples):
    assert not model.training, "You need to call model.eval()."
    num_total_size = 0
    num_valid_size = 0
    num_cycle = 0
    num_valid = 0
    plot_times = 0
    adj_lists_to_plot = []
    for i in range(num_samples):
        sampled_graph = model()
        if isinstance(sampled_graph, list):
            # When the model is a batched implementation, a list of
            # DGLGraph objects is returned. Note that with model(),
            # we generate a single graph as with the non-batched
            # implementation. We actually support batched generation
            # during the inference so feel free to modify the code.
            sampled_graph = sampled_graph[0]
        sampled_adj_list = dglGraph_to_adj_list(sampled_graph)
        adj_lists_to_plot.append(sampled_adj_list)
        graph_size = sampled_graph.num_nodes()
        valid_size = self.v_min <= graph_size <= self.v_max
        cycle = is_cycle(sampled_graph)
        num_total_size += graph_size
        if valid_size:
            num_valid_size += 1
        if cycle:
            num_cycle += 1
        if valid_size and cycle:
            num_valid += 1
        if len(adj_lists_to_plot) >= 4:
            plot_times += 1
            fig, ((ax0, ax1), (ax2, ax3)) = plt.subplots(2, 2)
            axes = {0: ax0, 1: ax1, 2: ax2, 3: ax3}
            for i in range(4):
                nx.draw_circular(
                    nx.from_dict_of_lists(adj_lists_to_plot[i]),
                    with_labels=True,
                    ax=axes[i],
                )
            plt.savefig(self.dir + "/samples/{:d}".format(plot_times))
            plt.close()
            adj_lists_to_plot = []
    self.num_samples_examined = num_samples
    self.average_size = num_total_size / num_samples
    self.valid_size_ratio = num_valid_size / num_samples
    self.cycle_ratio = num_cycle / num_samples
    self.valid_ratio = num_valid / num_samples