def render_short_struct_summary(
    the_struct: struct.Struct,
) -> rendering_parts.RenderableTreePart:
  """Renders a short summary of a struct.

  Can be used by other handlers that manipulate structs.

  Args:
    the_struct: Struct to render.

  Returns:
    A short, single-line summary of the struct.
  """
  background_color, background_pattern = (
      formatting_util.parse_simple_color_and_pattern_spec(
          the_struct.treescope_color(), type(the_struct).__name__
      )
  )
  return rendering_parts.build_one_line_tree_node(
      rendering_parts.text(type(the_struct).__name__ + "(...)"),
      background_color=background_color,
      background_pattern=background_pattern,
  ).renderable
Renders a short summary of a struct.

  Can be used by other handlers that manipulate structs.

  Args:
    the_struct: Struct to render.

  Returns:
    A short, single-line summary of the struct.
  
penzai/core/_treescope_handlers/struct_handler.py