code: def get_partitions_info_str(j):
      partitions: List[Union[int, float]] = j["components"][
          "partition_counts"
      ]["counts"]
      partitions_info = {
          "Partitions": len(partitions),
          "Rows": sum(partitions),
          "Empty partitions": len([p for p in partitions if p == 0]),
      }
      if partitions_info["Partitions"] > 1:
          partitions_info.update(
              {
                  "Min(rows/partition)": min(partitions),
                  "Max(rows/partition)": max(partitions),
                  "Median(rows/partition)": median(partitions),
                  "Mean(rows/partition)": int(mean(partitions)),
                  "StdDev(rows/partition)": int(stdev(partitions)),
              }
          )
  
      return "\n{}".format(IDENT).join(
          ["{}: {}".format(k, v) for k, v in partitions_info.items()]
      )
  
file_path: hail/hail/python/hailtop/hailctl/describe.py
imports: import asyncio
  import orjson
  from typing import List, Optional, Union, Annotated
  from os import path
  from zlib import decompress, MAX_WBITS
  from statistics import median, mean, stdev
  from collections import OrderedDict
  from typer import Option
label_desc: Use image node_id 4 for calling a global function with example usage: get_partitions_info_str(j) and returns: str