code: def html_format(data, out, opts=None, **kwargs):
      '''
      Return the formatted string as HTML.
      '''
      ansi_escaped_string = string_format(data, out, opts, **kwargs)
      return ansi_escaped_string.replace(' ', '&nbsp;').replace('\n', '<br />'f html_format(data, out, opts=None, **kwargs):
      '''
      Return the formatted string as HTML.
      '''
      ansi_escaped_string = string_format(data, out, opts, **kwargs)
      return ansi_escaped_string.replace(' ', '&nbsp;').replace('\n', '<br />')
docs: Return the formatted string as HTML.