code: def truncate_pandas_data_profile(title: str, data_frame) -> str:
      """Returns a data profiling string over input data frame.
  
      :param title: String, the title of the data profile.
      :param data_frame: DataFrame, contains data to be profiled.
      :return: a data profiling string such as Pandas profiling ProfileReport.
      """
      if len(data_frame) == 0:
          return (title, data_frame)
  
      max_cells = min(data_frame.size, _MAX_PROFILE_CELL_SIZE)
      max_cols = min(data_frame.columns.size, _MAX_PROFILE_COL_SIZE)
      max_rows = min(
          max(max_cells // max_cols, 1),
          len(data_frame),
          _MAX_PROFILE_ROW_SIZE,
      )
      truncated_df = data_frame.drop(
          columns=data_frame.columns[max_cols:]
      ).sample(n=max_rows, ignore_index=True, random_state=42)
      if (
          max_cells == _MAX_PROFILE_CELL_SIZE
          or max_cols == _MAX_PROFILE_COL_SIZE
          or max_rows == _MAX_PROFILE_ROW_SIZE
      ):
          _logger.info(
              "Truncating the data frame for %s to %d cells, %d columns and %d rows",
              title,
              max_cells,
              max_cols,
              max_rows,
          )
      return (title, truncated_df)
  
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 5 for calling a global function with example usage: truncate_pandas_data_profile(title, data_frame) and returns: title,  truncated_df, title,  data_frame