code: def __test_internal(
      monkeypatch,
      render_key,
      state,
      heatmap_args,
      facet_cls,
      text_render=None,
      **kwargs,
  ):
      call_heatmap = MagicMock()
      call_show = MagicMock()
      call_yticks = MagicMock()
      call_subplots = MagicMock(return_value=("fig", "ax"))
      call_render_markdown = MagicMock()
  
      analysis = facet_cls(fig_args=dict(some_arg=123), **kwargs)
      analysis.render_markdown = call_render_markdown
  
      with monkeypatch.context() as m:
          m.setattr(sns, "heatmap", call_heatmap)
          m.setattr(plt, "show", call_show)
          m.setattr(plt, "yticks", call_yticks)
          m.setattr(plt, "subplots", call_subplots)
          auto.analyze(state=state, viz_facets=[analysis])
  
      call_yticks.assert_called_with(rotation=0)
      call_subplots.assert_called_with(some_arg=123, figsize=(4, 4))
      call_show.assert_called_with("fig")
  
      call_heatmap.assert_called_with(
          state[render_key].train_data,
          annot=True,
          ax="ax",
          linewidths=0.5,
          linecolor="lightgrey",
          fmt=".2f",
          square=True,
          cbar_kws={"shrink": 0.5},
          **heatmap_args,
      )
      if text_render is not None:
          call_render_markdown.assert_called_with(text_render)
      else:
          call_render_markdown.assert_not_called()
  
imports: from unittest.mock import ANY, MagicMock
  import matplotlib.pyplot
  import numpy
  import pandas
  import pytest
  import scipy
  import seaborn
  from hamcrest.library.integration import match_equality
  from pandas import DataFrame
  from sklearn.inspection import PartialDependenceDisplay
  import autogluon.eda.auto
  from autogluon.common.features.types import R_BOOL, R_CATEGORY, R_FLOAT, R_INT, R_OBJECT
  from autogluon.eda import AnalysisState
  from autogluon.eda.visualization import CorrelationSignificanceVisualization, CorrelationVisualization, FeatureInteractionVisualization, PDPInteractions
  from autogluon.eda.visualization.interaction import FeatureDistanceAnalysisVisualization
label_desc: Use image node_id 9 for calling a global function with example usage: __test_internal(monkeypatch, render_key, state, heatmap_args, facet_cls, text_render) without return types