code: def _repr_html_(self):
      show_user = False
      user = None
      for experiment in self:
          if user is not None and user != experiment.user:
              show_user = True
              break
          user = experiment.user
  
      show_host = False
      host = None
      for experiment in self:
          if host is not None and host != experiment.host:
              show_host = True
              break
          host = experiment.host
      if host == "":
          show_host = False
  
      def format_checkpoint(checkpoint: Optional[Checkpoint]) -> str:
          if not checkpoint:
              return ""
          parens = []
          if checkpoint.step is not None:
              parens.append("step {}".format(checkpoint.step))
          if (
              checkpoint.primary_metric
              and checkpoint.metrics
              and checkpoint.metrics.get(
                  checkpoint.primary_metric["name"]
              )
              is not None
          ):
              parens.append(
                  "{}: {}".format(
                      checkpoint.primary_metric["name"],
                      checkpoint.metrics[
                          checkpoint.primary_metric["name"]
                      ],
                  )
              )
          if parens:
              return "{} ({})".format(
                  checkpoint.short_id(), "; ".join(parens)
              )
          return checkpoint.short_id()
  
      headings = ["id", "created"]
      if show_user:
          headings.append("user")
      if show_host:
          headings.append("host")
      headings += ["params", "latest_checkpoint", "best_checkpoint"]
      out = ["<table>"]
      out.append("<tr>")
      for h in headings:
          out.append("<th>")
          out.append(html.escape(h))
          out.append("</th>")
      out.append("</tr>")
      for experiment in self:
          out.append("<tr>")
          for h in headings:
              if h == "latest_checkpoint":
                  d = format_checkpoint(experiment.latest())
              elif h == "best_checkpoint":
                  d = format_checkpoint(experiment.best())
              else:
                  d = getattr(experiment, h)
                  d = str(d)
                  if h == "id":
                      d = d[:7]
              out.append("<th>")
              out.append(html.escape(d))
              out.append("</th>")
          out.append("</tr>")
      out.append("</table>")
      return "".join(out)
  
imports: import datetime
  import getpass
  import html
  import json
  import math
  import os
  import shlex
  import sys
  from typing import TYPE_CHECKING, Any, Callable, Dict, List, MutableSequence, Optional, Tuple
  from .None import console
  from .checkpoint import Checkpoint, CheckpointList, PrimaryMetric
  from .metadata import parse_rfc3339, rfc3339_datetime
  from .packages import get_imported_packages
  from .system import get_python_version
  from .validate import check_path
  from .version import version
label_desc: Use image node_id 5 for calling the ExperimentList obj's underlying member method code with example usage: obj._repr_html_() and returns: str, checkpoint, str, str