class_docstr: SegSummarizer serializes the operations for data analysis in Auto3Dseg pipeline. It loads
  two types of analyzer functions and execute differently. The first type of analyzer is
  CaseAnalyzer which is similar to traditional monai transforms. It can be composed with other
  transforms to process the data dict which has image/label keys. The second type of analyzer
  is SummaryAnalyzer which works only on a list of dictionary. Each dictionary is the output
  of the case analyzers on a single dataset.
  
  Args:
      image_key: a string that user specify for the image. The DataAnalyzer will look it up in the
          datalist to locate the image files of the dataset.
      label_key: a string that user specify for the label. The DataAnalyzer will look it up in the
          datalist to locate the label files of the dataset. If label_key is None, the DataAnalyzer
          will skip looking for labels and all label-related operations.
      do_ccp: apply the connected component algorithm to process the labels/images.
      hist_bins: list of positive integers (one for each channel) for setting the number of bins used to
          compute the histogram. Defaults to [100].
      hist_range: list of lists of two floats (one for each channel) setting the intensity range to
          compute the histogram. Defaults to [-500, 500].
      histogram_only: whether to only compute histograms. Defaults to False.
  
  Examples:
      .. code-block:: python
  
          # imports
  
          summarizer = SegSummarizer("image", "label")
          transform_list = [
              LoadImaged(keys=keys),
              EnsureChannelFirstd(keys=keys),  # this creates label to be (1,H,W,D)
              ToDeviced(keys=keys, device=device, non_blocking=True),
              Orientationd(keys=keys, axcodes="RAS"),
              EnsureTyped(keys=keys, data_type="tensor"),
              Lambdad(keys="label", func=lambda x: torch.argmax(x, dim=0, keepdim=True) if x.shape[0] > 1 else x),
              SqueezeDimd(keys=["label"], dim=0),
              summarizer,
          ]
          ...
          # skip some steps to set up data loader
          dataset = data.DataLoader(ds, batch_size=1, shuffle=False, num_workers=n_workers, collate_fn=no_collation)
          transform = Compose(transform_list)
          stats = []
          for batch_data in dataset:
              d = transform(batch_data[0])
              stats.append(d)
          report = summarizer.summarize(stats)
docstr: Summarize the input list of data and generates a report ready for json/yaml export.
  
  Args:
      data: a list of data dicts.
  
  Returns:
      a dict that summarizes the stats across data samples.
  
  Examples:
      stats_summary:
          image_foreground_stats:
              intensity: {...}
          image_stats:
              channels: {...}
              cropped_shape: {...}
              ...
          label_stats:
              image_intensity: {...}
              label:
              - image_intensity: {...}
              - image_intensity: {...}
              - image_intensity: {...}
              - image_intensity: {...}
docstr_tok: ["Summarize","the","input","list","of","data","and","generates","a","report","ready","for","json\/yaml","export",".","Args",":","data",":","a","list","of","data","dicts",".","Returns",":","a","dict","that","summarizes","the","stats","across","data","samples",".","Examples",":","stats_summary",":","image_foreground_stats",":","intensity",":","{","...","}","image_stats",":","channels",":","{","...","}","cropped_shape",":","{","...","}","...","label_stats",":","image_intensity",":","{","...","}","label",":","-","image_intensity",":","{","...","}","-","image_intensity",":","{","...","}","-","image_intensity",":","{","...","}","-","image_intensity",":","{","...","}"]
code: def summarize(self, data: list[dict]) -> dict[str, dict]:
      """
      Summarize the input list of data and generates a report ready for json/yaml export.
  
      Args:
          data: a list of data dicts.
  
      Returns:
          a dict that summarizes the stats across data samples.
  
      Examples:
          stats_summary:
              image_foreground_stats:
                  intensity: {...}
              image_stats:
                  channels: {...}
                  cropped_shape: {...}
                  ...
              label_stats:
                  image_intensity: {...}
                  label:
                  - image_intensity: {...}
                  - image_intensity: {...}
                  - image_intensity: {...}
                  - image_intensity: {...}
      """
      if not isinstance(data, list):
          raise ValueError(
              f"{self.__class__} summarize function needs input to be a list of dict"
          )
  
      report: dict[str, dict] = {}
      if len(data) == 0:
          return report
  
      if not isinstance(data[0], dict):
          raise ValueError(
              f"{self.__class__} summarize function needs a list of dict. Now we have {type(data[0])}"
          )
  
      for analyzer in self.summary_analyzers:
          if callable(analyzer):
              report.update({analyzer.stats_name: analyzer(data)})
  
      return report
  
file_path: MONAI/monai/auto3dseg/seg_summarizer.py
imports: from __future__ import annotations
  from typing import Any
  from monai.auto3dseg.analyzer import Analyzer, FgImageStats, FgImageStatsSumm, FilenameStats, ImageHistogram, ImageHistogramSumm, ImageStats, ImageStatsSumm, LabelStats, LabelStatsSumm
  from monai.transforms import Compose
  from monai.utils.enums import DataStatsKeys
label_desc: Use image node_id 3 for calling the SegSummarizer obj's underlying member method code with example usage: obj.summarize(data) and returns: report, report