code: def sensitive_data(
      df,
      mode: str = "redact",
      detect_infotypes: bool = True,
      columns: Optional[list] = None,
      score_threshold: float = _DEFAULT_SCORE_THRESHOLD,
      sample_size: int = _SAMPLE_SIZE,
      engine_backend=None,
      compute_backend: Optional[str] = None,
  ):
      """Identifies, redacts, and/or encrypts PII data.
  
      Note:
          `sensitive_data` uses Microsoft's Presidio in the backend. Presidio can be used
          to help identify sensitive data. However, because Presidio uses trained ML models,
          there is no guarantee that Presidio will find all sensitive information.
  
      Args:
          df (DataFrame): The dataframe
          mode (str): {'redact', 'encrypt'}
              redact: Redact the sensitive data
              encrypt: Anonymize the sensitive data
          detect_infotypes (bool): If True, identifies infotypes for each column
          columns ([str]): Defaults to None
          score_threshold (float): Minimum confidence value for detected entities to be returned. Default is 0.2.
          sample_size (int): Number of sampled rows used for identifying column infotypes. Default is 100.
          engine_backend: The backend analyzer engine. Default is presidio_analyzer.
          compute_backend (str): Select compute backend
  
      Raises:
          ValueError: Invalid input data type.
          TypeError: `columns` not a list of strings.
  
      Returns:
          SensitiveDataWidget
      """
      if not engine_backend:
          engine_backend = presidio_engine()
  
      if not _is_dataframe(df):
          raise ValueError(
              "Pandas data frame or modin data frame required"
          )
  
      if _compat.check_install("modin.pandas"):
          if _is_dataframe(df, "modin"):
              warnings.warn(
                  "Sensitive data does not currently support Modin DataFrames. Converting to Pandas."
              )
              df = df._to_pandas()
  
      if columns:
          if not isinstance(columns, list):
              raise TypeError("cols must be type list")
  
      if mode not in ["encrypt", "redact", None]:
          raise ValueError(
              "mode must be set to 'encrypt', 'redact', or None"
          )
  
      sensitivewidget = _get_compute_backend(
          compute_backend, df
      ).compute_sensitive_data(
          df=df,
          mode=mode,
          detect_infotypes=detect_infotypes,
          columns=columns,
          score_threshold=score_threshold,
          sample_size=sample_size,
          engine_backend=engine_backend,
      )
  
      sensitivewidget.columns = columns
      sensitivewidget.score_threshold = score_threshold
      sensitivewidget.sample_size = (
          sample_size if detect_infotypes else None
      )
      sensitivewidget.engine = engine_backend
  
      return sensitivewidget
  
imports: import hashlib
  import logging
  from functools import reduce
  from typing import Optional, Union
  import warnings
  from data_describe.misc.logging import OutputLogger
  from data_describe.backends import _get_compute_backend
  from data_describe.compat import _is_dataframe, _compat, _requires
  from data_describe.config._config import get_option
  from data_describe._widget import BaseWidget
label_desc: Use image node_id 1 for calling a global function with example usage: sensitive_data(df, mode, detect_infotypes, columns, score_threshold, sample_size, engine_backend, compute_backend) and returns: sensitivewidget