docstr: Test merging small categories into 'other' category
docstr_tok: ["Test","merging","small","categories","into","'other","'","category"]
code: def test_generate_fig_univariate_categorical_5(self):
      """
      Test merging small categories into 'other' category
      """
      df = pd.DataFrame(
          {
              "int_data": [k for k in range(10) for _ in range(k)],
              "data_train_test": ["train"] * 45,
          }
      )
  
      fig = generate_fig_univariate_categorical(
          df, "int_data", "data_train_test", nb_cat_max=7
      )
  
      assert len(fig.axes[0].patches) == 7
  
file_path: shapash/tests/unit_tests/report/test_plots.py
imports: import unittest
  from unittest.mock import patch
  import pandas
  import numpy
  import matplotlib.pyplot
  from shapash.report.plots import generate_fig_univariate, generate_fig_univariate_continuous, generate_fig_univariate_categorical
  from shapash.report.common import VarType
label_desc: Use image node_id 9 for calling the TestPlots obj's underlying member method code with example usage: obj.test_generate_fig_univariate_categorical_5() without return types