code: def display_html(
      html_data: Optional[str] = None,
      html_file_path: Optional[str] = None,
  ) -> None:
      if html_file_path is None and html_data is None:
          raise MlflowException(
              "At least one HTML source must be provided. html_data and html_file_path are empty.",
              error_code=INVALID_PARAMETER_VALUE,
          )
  
      if is_running_in_ipython_environment():
          from IPython.display import HTML
          from IPython.display import display as ip_display
  
          html_file_path = html_file_path if html_data is None else None
  
          if is_in_databricks_runtime():
              dbr_version_image_key = get_databricks_runtime()
              dbr_version = dbr_version_image_key.split("-")[0]
              if int(dbr_version.split(".")[0]) < 11:
                  raise MlflowException(
                      f"Use Databricks Runtime 11 or newer with MLflow Recipes. "
                      f"Current version is {dbr_version} ",
                      error_code=BAD_REQUEST,
                  )
              # Patch IPython display with Databricks display before showing the HTML.
              import IPython.core.display as icd
  
              orig_display = icd.display
              icd.display = display  # noqa: F821
              ip_display(HTML(data=html_data, filename=html_file_path))
              icd.display = orig_display
          else:
              ip_display(HTML(data=html_data, filename=html_file_path))
      else:
          # Use xdg-open in Linux environment
          if shutil.which("xdg-open") is not None:
              open_tool = shutil.which("xdg-open")
          elif shutil.which("open") is not None:
              open_tool = shutil.which("open")
          else:
              open_tool = None
  
          if (
              os.path.exists(html_file_path)
              and open_tool is not None
              # On Windows, attempting to clean up the card while it's being accessed by
              # the process running `open_tool` results in a PermissionError. To avoid this,
              # skip displaying the card.
              and "GITHUB_ACTIONS" not in os.environ
          ):
              _logger.info(f"Opening HTML file at: '{html_file_path}'")
              try:
                  subprocess.run(
                      [open_tool, html_file_path], check=True
                  )
              except Exception as e:
                  _logger.warning(
                      f"Encountered unexpected error opening the html page."
                      f" The file may be manually accessed at {html_file_path}. Exception: {e}"
                  )
  
file_path: mlflow/mlflow/recipes/utils/step.py
imports: import logging
  import os
  import shutil
  import subprocess
  from typing import Dict, Iterable, List, Optional, Tuple
  import numpy
  import pandas
  from mlflow.exceptions import BAD_REQUEST, INVALID_PARAMETER_VALUE, MlflowException
  from mlflow.recipes.cards import pandas_renderer
  from mlflow.utils.databricks_utils import get_databricks_runtime, is_in_databricks_runtime, is_running_in_ipython_environment
label_desc: Use image node_id 2 for calling a global function with example usage: display_html(html_data, html_file_path) without return types