code: def plot(
      X,
      y=None,
      target_col=None,
      type_hints=None,
      scatter_alpha="auto",
      scatter_size="auto",
      drop_outliers=True,
      verbose=10,
      plot_pairwise=True,
      **kwargs,
  ):
      """Automatic plots for classification and regression.
  
      Determines whether the target is categorical or continuous and plots the
      target distribution. Then calls the relevant plotting functions
      accordingly.
  
      See the functions in the "see also" section for more parameters that
      can be passed as kwargs.
  
  
      Parameters
      ----------
      X : DataFrame
          Input features. If target_col is specified, X also includes the
          target.
      y : Series or numpy array, optional.
          Target. You need to specify either y or target_col.
      target_col : string or int, optional
          Column name of target if included in X.
      type_hints : dict or None
          If dict, provide type information for columns.
          Keys are column names, values are types as provided by detect_types.
      scatter_alpha : float, default='auto'
          Alpha values for scatter plots. 'auto' is dirty hacks.
      scatter_size : float, default='auto'.
          Marker size for scatter plots. 'auto' is dirty hacks.
      plot_pairwise : bool, default=True
          Whether to include pairwise scatterplots for classification.
          These can be somewhat expensive to compute.
      verbose : int, default=10
          Controls the verbosity (output).
      drop_outliers : bool, default=True
          Whether to drop outliers in the target column for regression.
  
      See also
      --------
      plot_regression_continuous
      plot_regression_categorical
      plot_classification_continuous
      plot_classification_categorical
      """
      if (
          (y is None and target_col is None)
          or (y is not None)
          and (target_col is not None)
      ):
          raise ValueError("Need to specify either y or target_col.")
      if not isinstance(X, pd.DataFrame):
          X = pd.DataFrame(X)
      if isinstance(y, str):
          warnings.warn(
              "The second positional argument of plot is a Series 'y'."
              " If passing a column name, use a keyword.",
              FutureWarning,
          )
          target_col = y
          y = None
      if target_col is None:
          if not isinstance(y, pd.Series):
              y = pd.Series(y)
          if y.name is None:
              y = y.rename("target")
          target_col = y.name
          X = pd.concat([X, y], axis=1)
  
      X, types = clean(
          X,
          type_hints=type_hints,
          return_types=True,
          target_col=target_col,
      )
      types = _check_X_target_col(X, target_col, types=types)
  
      res = []
      if types.continuous[target_col]:
          print("Target looks like regression")
          # FIXME we might be overwriting the original dataframe here?
          X[target_col] = X[target_col].astype(float)
          # regression
          # make sure we include the target column in X
          # even though it's not categorical
  
          if drop_outliers:
              inliers = _find_inliers(X.loc[:, target_col])
              n_outliers = len(X) - inliers.sum()
              if n_outliers > 0:
                  warn(
                      f"Discarding {n_outliers} outliers in target column.",
                      UserWarning,
                  )
                  X = X.loc[inliers, :]
          _, ax = plt.subplots()
          ax.hist(X[target_col], bins="auto")
          ax.set(
              xlabel=_shortname(target_col),
              ylabel="frequency",
              title="Target distribution",
          )
          _apply_eng_formatter(ax, which="x")
          _apply_eng_formatter(ax, which="y")
          res.append(ax)
          scatter_alpha = _get_scatter_alpha(
              scatter_alpha, X[target_col]
          )
          scatter_size = _get_scatter_size(scatter_size, X[target_col])
  
          res.append(
              plot_regression_continuous(
                  X,
                  target_col=target_col,
                  types=types,
                  scatter_alpha=scatter_alpha,
                  scatter_size=scatter_size,
                  **kwargs,
              )
          )
          res.append(
              plot_regression_categorical(
                  X, target_col=target_col, types=types, **kwargs
              )
          )
      else:
          print("Target looks like classification")
          # regression
          # make sure we include the target column in X
          # even though it's not categorical
          plt.figure()
          counts = pd.DataFrame(X[target_col].value_counts())
          melted = counts.T.melt().rename(
              columns={"variable": target_col, "value": "count"}
          )
          # class could be a string that's a float
          # seaborn is trying to be smart unless we declare it categorical
          # we actually fixed counts to have categorical index
          # but melt destroys it:
          # https://github.com/pandas-dev/pandas/issues/15853
          melted[target_col] = melted[target_col].astype("category")
          ax = sns.barplot(y=target_col, x="count", data=melted)
          res.append(ax)
          _apply_eng_formatter(ax, which="x")
          plt.title("Target distribution")
          if len(counts) >= 50:
              print(
                  "Not plotting anything for 50 classes or more."
                  "Current visualizations are quite useless for"
                  " this many classes. Try slicing the data."
              )
          res.append(
              plot_classification_continuous(
                  X,
                  target_col=target_col,
                  types=types,
                  hue_order=counts.index,
                  scatter_alpha=scatter_alpha,
                  scatter_size=scatter_size,
                  plot_pairwise=plot_pairwise,
                  **kwargs,
              )
          )
          res.append(
              plot_classification_categorical(
                  X,
                  target_col=target_col,
                  types=types,
                  hue_order=counts.index,
                  **kwargs,
              )
          )
      return res
  
imports: import warnings
  import numpy
  import matplotlib.pyplot
  import matplotlib
  import seaborn
  import pandas
  from sklearn.feature_selection import mutual_info_regression, mutual_info_classif, f_classif
  from sklearn.impute import SimpleImputer
  from sklearn.preprocessing import scale
  from sklearn.decomposition import PCA
  from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
  from sklearn.metrics import recall_score
  from ..preprocessing import detect_types, clean
  from .utils import _check_X_target_col, _get_n_top, _make_subplots, _short_tick_names, _shortname, _prune_category_make_X, find_pretty_grid, _find_scatter_plots_classification, class_hists, discrete_scatter, mosaic_plot, _find_inliers, pairplot, _get_scatter_alpha, _get_scatter_size, _find_categorical_for_regression, _prune_categories, _apply_eng_formatter
  from .sankey import plot_sankey
  from warnings import warn
label_desc: Use image node_id 9 for calling a global function with example usage: plot(X, y, target_col, type_hints, scatter_alpha, scatter_size, drop_outliers, verbose, plot_pairwise) and returns: res