class_docstr: Feature interaction visualization.
  
  This report renders feature interaction analysis results.
  The details of the report to be rendered depend on the variable types combination in `x`/`y`/`hue`.
  `key` is used to link analysis and visualization - this allows to have multiple analyses/visualizations in one composite analysis.
  
  Parameters
  ----------
  key: str
      key used to store the analysis in the state; the value is placed in the state by FeatureInteraction.
      If the key is not provided, then use one of theform: 'x:A|y:B|hue:C' (omit corresponding x/y/hue if the value not provided)
      See also :class:`autogluon.eda.analysis.interaction.FeatureInteraction`
  numeric_as_categorical_threshold
  headers: bool, default = False
      if `True` then render headers
  namespace: Optional[str], default = None
      namespace to use; can be nested like `ns_a.ns_b.ns_c`
  fig_args: Optional[Dict[str, Any]] = None,
      kwargs to pass into chart figure
  kwargs
      parameters to pass as a chart args
  
  See Also
  --------
  :py:class:`~autogluon.eda.analysis.interaction.FeatureInteraction`
class_docstr_tok: ["Feature","interaction","visualization",".","This","report","renders","feature","interaction","analysis","results",".","The","details","of","the","report","to","be","rendered","depend","on","the","variable","types","combination","in","`","x","`","\/","`","y","`","\/","`","hue","`",".","`","key","`","is","used","to","link","analysis","and","visualization","-","this","allows","to","have","multiple","analyses\/visualizations","in","one","composite","analysis",".","Parameters","--","--","--","--","--","key",":","str","key","used","to","store","the","analysis","in","the","state",";","the","value","is","placed","in","the","state","by","FeatureInteraction",".","If","the","key","is","not","provided",",","then","use","one","of","theform",":","'","x",":","A|y",":","B|hue",":","C","'","(","omit","corresponding","x\/y\/hue","if","the","value","not","provided",")","See","also",":","class",":","`","autogluon.eda.analysis.interaction.FeatureInteraction","`","numeric_as_categorical_threshold","headers",":","bool",",","default","=","False","if","`","True","`","then","render","headers","namespace",":","Optional","[","str","]",",","default","=","None","namespace","to","use",";","can","be","nested","like","`","ns_a.ns_b.ns_c","`","fig_args",":","Optional","[","Dict","[","str",",","Any","]","]","=","None",",","kwargs","to","pass","into","chart","figure","kwargs","parameters","to","pass","as","a","chart","args","See","Also","--","--","--","--",":","py",":","class",":","`","~autogluon.eda.analysis.interaction.FeatureInteraction","`"]
code: def _swap_y_and_hue_if_necessary(
      self, x_type, y, y_type, hue, hue_type
  ):
      # swap y <-> hue when category vs category is provided and no hue is specified
      if (
          (x_type is not None)
          and y_type == "category"
          and hue_type is None
      ):
          hue, hue_type = y, y_type
          y, y_type = None, None
      return y, y_type, hue, hue_type
  
imports: from abc import ABC, abstractmethod
  from typing import Any, Dict, List, Optional, Tuple, Type, Union
  import matplotlib.pyplot
  import numpy
  import pandas
  import seaborn
  from scipy import stats
  from scipy.cluster import hierarchy
  from sklearn.inspection import PartialDependenceDisplay
  from autogluon.common.features.types import R_BOOL, R_CATEGORY, R_DATETIME, R_FLOAT, R_INT, R_OBJECT
  from ..state import AnalysisState
  from .base import AbstractVisualization
  from .jupyter import JupyterMixin
label_desc: Use image node_id 6 for calling the FeatureInteractionVisualization obj's underlying member method code with example usage: obj._swap_y_and_hue_if_necessary(x_type, y, y_type, hue, hue_type) and returns: y,  y_type,  hue,  hue_type