code: def _prep_dist(distances):
      """create a dict of mean and max graphical distance
  
      Args:
          distances (array[float]): indicates the graphical distance
  
      Returns:
          ``dict(mean=distances.mean(), max=distances.max())``
      """
      if distances is None:
          import numpy as np
  
          return dict(mean=np.nan, max=np.nan)
      return dict(mean=distances.mean(), max=distances.max())
  
file_path: mystic/mystic/cache/archive.py
imports: from klepto.archives import dict_archive, dir_archive, file_archive, hdf_archive, hdfdir_archive, null_archive, sql_archive, sqltable_archive
label_desc: Use image node_id 7 for calling a global function with example usage: _prep_dist(distances) and returns: dict, dict