code: def to_html(df: pd.DataFrame) -> str:
      html = df.to_html(
          classes="duplicate table table-striped",
      )
      if df.empty:
          html = html.replace(
              "<tbody>",
              f"<tbody><tr><td colspan={len(df.columns) + 1}>Dataset does not contain duplicate rows.</td></tr>",
          )
      return html
  
imports: import pandas
  from ydata_profiling.report.presentation.core.duplicate import Duplicate
  from ydata_profiling.report.presentation.flavours.html import templates
label_desc: Use image node_id 1 for calling a global function with example usage: to_html(df) and returns: html