code: def analyze_interaction(
      train_data: pd.DataFrame,
      x: Optional[str] = None,
      y: Optional[str] = None,
      hue: Optional[str] = None,
      fit_distributions: Union[bool, str, List[str]] = False,
      fig_args: Optional[Dict[str, Any]] = None,
      chart_args: Optional[Dict[str, Any]] = None,
      **analysis_args,
  ):
      """
      This helper performs simple feature interaction analysis.
  
      Parameters
      ----------
      train_data: pd.DataFrame
          training dataset
      x: Optional[str], default = None
      y: Optional[str], default = None
      hue: Optional[str], default = None
      fit_distributions: Union[bool, str, List[str]], default = False,
          If `True`, or list of distributions is provided, then fit distributions. Performed only if `y` and `hue` are not present.
      chart_args: Optional[dict], default = None
          kwargs to pass into visualization component
      fig_args: Optional[Dict[str, Any]], default = None,
          kwargs to pass into visualization component
  
      Examples
      --------
      >>> import pandas as pd
      >>> import autogluon.eda.auto as auto
      >>>
      >>> df_train = pd.DataFrame(...)
      >>>
      >>> auto.analyze_interaction(x='Age', hue='Survived', train_data=df_train, chart_args=dict(headers=True, alpha=0.2))
  
      See Also
      --------
      :py:class:`~autogluon.eda.analysis.interaction.FeatureInteraction`
      :py:class:`~autogluon.eda.visualization.interaction.FeatureInteractionVisualization`
      """
      assert (
          (x is not None) or (y is not None) or (hue is not None)
      ), "At least one of the parameters must be specified: x, y or hue"
      fig_args = get_empty_dict_if_none(fig_args).copy()
      if "figsize" not in fig_args:
          fig_args["figsize"] = (12, 6)
  
      chart_args = get_empty_dict_if_none(chart_args)
  
      key = "__analysis__"
  
      _analysis_args = analysis_args.copy()
      _analysis_args.pop("return_state", None)
  
      pvalue_min = _analysis_args.pop("pvalue_min", 0.01)
      keep_top_n = _analysis_args.pop("keep_top_n", 5)
      numeric_as_categorical_threshold = _analysis_args.pop(
          "numeric_as_categorical_threshold", 20
      )
  
      state: AnalysisState = analyze(
          train_data=train_data,
          return_state=True,
          **_analysis_args,
          anlz_facets=[
              RawTypesAnalysis(),
              VariableTypeAnalysis(
                  numeric_as_categorical_threshold=numeric_as_categorical_threshold
              ),
          ],
      )  # type: ignore
  
      analysis_facets: List[AbstractAnalysis] = [
          FeatureInteraction(key=key, x=x, y=y, hue=hue),
      ]
  
      if x is not None:
          x_type = state.variable_type.train_data[x]
          if _is_single_numeric_variable(x, y, hue, x_type) and (
              fit_distributions is not False
          ):
              dists: Optional[List[str]]  # fit all
              if fit_distributions is True:
                  dists = None
              elif isinstance(fit_distributions, str):
                  dists = [fit_distributions]
              else:
                  dists = fit_distributions
  
              analysis_facets.append(
                  DistributionFit(
                      columns=x,
                      keep_top_n=keep_top_n,
                      pvalue_min=pvalue_min,
                      distributions_to_fit=dists,
                  )
              )  # type: ignore # x is always present
  
      _analysis_args = analysis_args.copy()
      _analysis_args.pop("state", None)
  
      return analyze(
          train_data=train_data,
          **_analysis_args,
          state=state,
          anlz_facets=analysis_facets,
          viz_facets=[
              FeatureInteractionVisualization(
                  key=key,
                  fig_args=fig_args,
                  numeric_as_categorical_threshold=numeric_as_categorical_threshold,
                  **chart_args,
              ),
          ],
      )
  
imports: import logging
  from typing import Any, Dict, List, Optional, Tuple, Union
  import pandas
  from autogluon.common.utils.log_utils import verbosity2loglevel
  from autogluon.features import CategoryFeatureGenerator
  from autogluon.tabular import TabularPredictor
  from ..None import AnalysisState
  from ..analysis import AnomalyDetectorAnalysis, ApplyFeatureGenerator, AutoGluonModelEvaluator, AutoGluonModelQuickFit, Correlation, DistributionFit, FeatureInteraction, MissingValuesAnalysis, ProblemTypeControl, ShapAnalysis, TrainValidationSplit, XShiftDetector
  from ..analysis.base import AbstractAnalysis, BaseAnalysis, SaveArgsToState
  from ..analysis.dataset import DatasetSummary, LabelInsightsAnalysis, RawTypesAnalysis, Sampler, SpecialTypesAnalysis, VariableTypeAnalysis
  from ..analysis.interaction import FeatureDistanceAnalysis
  from ..state import is_key_present_in_state
  from ..utils.common import expand_nested_args_into_nested_maps, get_empty_dict_if_none
  from ..utils.defaults import QuickFitDefaults
  from ..visualization import AnomalyScoresVisualization, ConfusionMatrix, CorrelationVisualization, DatasetStatistics, DatasetTypeMismatch, ExplainForcePlot, ExplainWaterfallPlot, FeatureImportance, FeatureInteractionVisualization, LabelInsightsVisualization, MarkdownSectionComponent, MissingValues, ModelLeaderboard, PropertyRendererComponent, RegressionEvaluation, XShiftSummary
  from ..visualization.base import AbstractVisualization
  from ..visualization.interaction import FeatureDistanceAnalysisVisualization, PDPInteractions
  from ..visualization.layouts import SimpleVerticalLinearLayout
label_desc: Use image node_id 2 for calling a global function with example usage: analyze_interaction(train_data, x, y, hue, fit_distributions, fig_args, chart_args) and returns: analyze