code: def test_beanplot_legend_text(age_and_labels, close_figures):
      age, labels = age_and_labels
  
      fig, ax = plt.subplots(1, 1)
      beanplot(
          age,
          ax=ax,
          labels=labels,
          plot_opts={"bean_legend_text": "text"},
      )
  
file_path: statsmodels/statsmodels/graphics/tests/test_boxplots.py
imports: import numpy
  import pytest
  from statsmodels.datasets import anes96
  from statsmodels.graphics.boxplots import beanplot, violinplot
label_desc: Use image node_id 8 for calling a global function with example usage: test_beanplot_legend_text(age_and_labels, close_figures) without return types