code: def get_stat(
      cls: str,
      name: str,
      child: Optional[str] = None,
      default: Any = None,
  ) -> str:
      if child is None and len(get_children(cls)) > 0:
          return ""
  
      stats_table = get_stats_table(cls)
  
      if len(stats_table) > 0:
          stats_table = "\n".join(stats_table.split("\n")[2:])
  
      match = re.search(f"^.*- {name}", stats_table, flags=re.DOTALL)
      if match is None:
          return default
  
      column = match.group().count(" -")
  
      if child is not None:
          child = child.replace("(", r"\(").replace(")", r"\)")
          match = re.search(
              f"[*] - {child}\n.*$", stats_table, flags=re.DOTALL
          )
          assert match is not None
          stats_row = match.group()
      else:
          stats_row = "*" + stats_table.split("*")[2]
  
      return stats_row.split(" -")[column].split("\n")[0].strip()
  
file_path: pytorch_geometric/torch_geometric/datasets/utils/cheatsheet.py
imports: import importlib
  import inspect
  import re
  from typing import Any, List, Optional
label_desc: Use image node_id 5 for calling a global function with example usage: get_stat(cls, name, child, default) and returns: stats_row, str, default