code: def collect_intensity_properties(self, num_modalities):
      if self.overwrite or not os.path.isfile(
          self.intensityproperties_file
      ):
          p = Pool(self.num_processes)
  
          results = OrderedDict()
          for mod_id in range(num_modalities):
              results[mod_id] = OrderedDict()
              voxels = p.starmap(
                  self._get_voxels_in_foreground,
                  zip(
                      self.patient_identifiers,
                      [mod_id] * len(self.patient_identifiers),
                  ),
              )
              all_voxels = []
              for voxel in voxels:
                  all_voxels += voxel
  
              (
                  median,
                  mean,
                  sd,
                  mn,
                  mx,
                  percentile_99_5,
                  percentile_00_5,
              ) = self._compute_stats(all_voxels)
              local_props = p.map(self._compute_stats, voxels)
              props_per_case = OrderedDict()
              for i, pat in enumerate(self.patient_identifiers):
                  props_per_case[pat] = OrderedDict()
                  props_per_case[pat]["median"] = local_props[i][0]
                  props_per_case[pat]["mean"] = local_props[i][1]
                  props_per_case[pat]["sd"] = local_props[i][2]
                  props_per_case[pat]["mn"] = local_props[i][3]
                  props_per_case[pat]["mx"] = local_props[i][4]
                  props_per_case[pat]["percentile_99_5"] = local_props[
                      i
                  ][5]
                  props_per_case[pat]["percentile_00_5"] = local_props[
                      i
                  ][6]
  
              results[mod_id]["local_props"] = props_per_case
              results[mod_id]["median"] = median
              results[mod_id]["mean"] = mean
              results[mod_id]["sd"] = sd
              results[mod_id]["mn"] = mn
              results[mod_id]["mx"] = mx
              results[mod_id]["percentile_99_5"] = percentile_99_5
              results[mod_id]["percentile_00_5"] = percentile_00_5
  
          p.close()
          p.join()
          with open(self.intensityproperties_file, "wb") as f:
              pickle.dump(results, f)
      else:
          with open(self.intensityproperties_file, "rb") as f:
              results = pickle.load(f)
      return results
  
file_path: PaddleSeg/contrib/MedicalSeg/tools/preprocess_utils/dataset_analyzer.py
imports: import json
  import os
  import pickle
  import numpy
  from skimage.morphology import label
  from collections import OrderedDict
  from multiprocessing import Pool
  from .path_utils import join_paths
label_desc: Use image node_id 10 for calling the DatasetAnalyzer obj's underlying member method code with example usage: obj.collect_intensity_properties(num_modalities) and returns: results