def scalar2str(arg, title=''):
  """ Return a single li element with the value and possibly the title of the item.
      Handles strings, ints, and floats.
  """
  assert not (isinstance(arg, dict) or isinstance(arg, list) or isinstance(arg, tuple))
  if title == '':
    title_str = ''
  else:
    title_str = f'<strong>{title}:</strong> '

  if isinstance(arg, str):
    return f'{title_str}{arg}'
  if isinstance(arg, int):
    return f'{title_str}{arg:,}'
  if isinstance(arg, float):
    return f'{title_str}{arg:0.2f}'
  return 'unexpected'