code: def calc_cluster_centers_1d(clusters_w_vals, method=np.median):
      """
      Calculate the cluster centers (for 1D clusters) using <method>.
      <clusters_w_vals> must be a sequence of tuples t where t[1] contains the values (as returned from
      zip_clusters_and_values).
      """
      return [method(vals) for _, vals in clusters_w_vals]
  
file_path: pdftabextract/pdftabextract/clustering.py
imports: import itertools
  import numpy
  from scipy.stats import chisquare
  from pdftabextract import logger
  from pdftabextract.common import fill_array_a_with_values_from_b, sorted_by_attr, flatten_list, update_text_dict_dim, DIRECTION_HORIZONTAL, DIRECTION_VERTICAL
label_desc: Use image node_id 9 for calling a global function with example usage: calc_cluster_centers_1d(clusters_w_vals, method) and returns: unknown