code: def make_graphviz_label(
      title: str,
      properties: List[DisplayedProperty],
      title_font_size: int = 12,
      property_font_size: int = 6,
  ) -> str:
      """Make a graphviz label that can be used for rendering to an image.
  
      The title will be in a large font, while the properties will be listed in a table in a smaller font.
      """
      # Convert all properties values into a HTML-safe string, then break the string into lines of 40 columns so that
      # the node boxes don't get so wide. Better to pretty-print the object, but unclear how to do so.
      formatted_properties = []
      for displayed_property in properties:
          lines = [
              html.escape(x)
              for x in textwrap.wrap(
                  str(displayed_property.value), width=40
              )
          ]
          formatted_properties.append(
              DisplayedProperty(
                  displayed_property.key, "<BR/>".join(lines)
              )
          )
  
      return jinja2.Template(
          # Formatting here: https://graphviz.org/doc/info/shapes.html#html
          textwrap.dedent(
              """\
              <<TABLE BORDER="0" CELLPADDING="1" CELLSPACING="0">
               <TR>
                 <TD ALIGN="LEFT" BALIGN="LEFT" VALIGN="TOP" COLSPAN="2"><FONT point-size="{{ title_size }}">{{ title }}</FONT></TD>
               </TR>
               {%- for key, value in properties %}
               <TR>
                 <TD ALIGN="LEFT" BALIGN="LEFT" VALIGN="TOP"><FONT point-size="{{ property_size }}">{{ key }}</FONT></TD>
                 <TD ALIGN="LEFT" BALIGN="LEFT" VALIGN="TOP"><FONT point-size="{{ property_size }}">{{ value }}</FONT></TD>
               </TR>
               {%- endfor %}
              </TABLE>>
              """
          ),
          undefined=jinja2.StrictUndefined,
      ).render(
          title=title,
          title_size=title_font_size,
          property_size=property_font_size,
          properties=[
              (displayed_property.key, displayed_property.value)
              for displayed_property in formatted_properties
          ],
      )
  
imports: from __future__ import annotations
  import html
  import logging
  import textwrap
  from abc import ABC, abstractmethod
  from dataclasses import dataclass
  from typing import Any, Generic, List, Sequence, TypeVar
  import jinja2
  from metricflow.dag.id_generation import IdGeneratorRegistry
  from metricflow.dag.id_prefix import IdPrefix
  from metricflow.dag.prefix_id import PrefixIdGenerator
  from metricflow.visitor import VisitorOutputT
label_desc: Use image node_id 1 for calling a global function with example usage: make_graphviz_label(title, properties, title_font_size, property_font_size) and returns: jinja2