from pathlib import Path
from typing import cast
import statistics

import lang_main.io
from lang_main.analysis import graphs

# target = '../results/test_20240529/Pipe-Token_Analysis_Step-1_build_token_graph.pkl'
# p = Path(target).resolve()
# ret = lang_main.io.load_pickle(p)
# tk_graph = cast(graphs.TokenGraph, ret[0])
# tk_graph_filtered = tk_graph.filter_by_edge_weight(150, None)
# tk_graph_filtered = tk_graph_filtered.filter_by_node_degree(1, None)
# cyto_data_base, weight_data, all_weights = graphs.convert_graph_to_cytoscape(tk_graph_filtered)


test = [1, 1, 1, 2, 2, 3, 3, 4, 4, 1000]
print(statistics.mean(test))
