docs: def get_metadata(realizations, kind):
      """
      :param list realizations:
          realization objects
      :param str kind:
          kind of data, i.e. a key in the datastore
      :returns:
          a dictionary with smlt_path, gsimlt_path, statistics, quantile_value
      """
      metadata = {}
      if kind.startswith('rlz-'):
          rlz = realizations[int(kind[4:])]
          metadata['smlt_path'] = '_'.join(rlz.sm_lt_path)
          metadata['gsimlt_path'] = rlz.gsim_rlz.uid
      elif kind.startswith('quantile-'):
          metadata['statistics'] = 'quantile'
          metadata['quantile_value'] = float(kind[9:])
      elif kind == 'mean':
          metadata['statistics'] = 'mean'
      elif kind == 'max':
          metadata['statistics'] = 'max'
      elif kind == 'std':
          metadata['statistics'] = 'std'
      return metadata