code: def _infer_categorical(df):
      categorical_cols = df.select_dtypes(
          include=[np.object, np.bool, np.int8]
      ).columns
      logging.warn(
          "No categorical_cols passed so inferred using np.object, "
          f"np.int8 and np.bool: {categorical_cols}. If you see an error"
          " these are not "
          "correct, please provide them as a string array as: "
          "categorical_cols=['col1', 'col2', ...]"
      )
      return categorical_cols
  
imports: import pandas
  import matplotlib.pyplot
  import numpy
  from scipy.stats import spearmanr
  from scipy.cluster import hierarchy
  from typing import List, Any, Union, Tuple, Optional, Dict
  import random, math
  from sklearn.metrics import roc_curve, precision_recall_curve, roc_auc_score, confusion_matrix
  import itertools
  import logging
label_desc: Use image node_id 17 for calling a global function with example usage: _infer_categorical(df) and returns: categorical_cols