code: def type_str(t, depth=1):
      name_map = {"Boolean": "bool", "String": "str"}
  
      def element_str(e):
          if isinstance(e, dict):
              if e["type"] == "Struct":
                  return "struct {{\n{}\n{}}}".format(
                      type_str(e["value"], depth + 1), (IDENT * depth)
                  )
              return "{}<{}>".format(
                  e["type"].lower(),
                  ", ".join([element_str(x) for x in e["value"]]),
              )
          return (
              name_map.get(e, e)
              .lower()
              .replace("(", "<")
              .replace(")", ">")
          )
  
      return "\n".join(
          "{}'{}': {}".format(IDENT * depth, k, element_str(v))
          for k, v in t.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 2 for calling a global function with example usage: type_str(t, depth) and returns: str, name_map, str, str