code: def test_tree_with_categories_below_max_category_values():
      X_train, y_train = _categorical_data(2, 10)
      params = {
          "n_estimators": 10,
          "num_leaves": 3,
          "min_data_in_bin": 1,
          "force_col_wise": True,
          "deterministic": True,
          "num_threads": 1,
          "seed": 708,
          "verbose": -1,
      }
      gbm = lgb.LGBMClassifier(**params)
      gbm.fit(X_train, y_train)
  
      with pytest.raises(IndexError):
          lgb.create_tree_digraph(gbm, tree_index=83)
  
      graph = lgb.create_tree_digraph(
          gbm,
          tree_index=3,
          show_info=["split_gain", "internal_value", "internal_weight"],
          name="Tree4",
          node_attr={"color": "red"},
          max_category_values=10,
      )
      graph.render(view=False)
      assert isinstance(graph, graphviz.Digraph)
      assert graph.name == "Tree4"
      assert len(graph.node_attr) == 1
      assert graph.node_attr["color"] == "red"
      assert len(graph.graph_attr) == 0
      assert len(graph.edge_attr) == 0
      graph_body = "".join(graph.body)
      assert "leaf" in graph_body
      assert "gain" in graph_body
      assert "value" in graph_body
      assert "weight" in graph_body
      assert "data" not in graph_body
      assert "count" not in graph_body
      assert "||...||" not in graph_body
  
imports: import numpy
  import pandas
  import pytest
  from sklearn.model_selection import train_test_split
  import lightgbm
  from lightgbm.compat import GRAPHVIZ_INSTALLED, MATPLOTLIB_INSTALLED, PANDAS_INSTALLED, pd_DataFrame
  from .utils import load_breast_cancer, make_synthetic_regression
label_desc: Use image node_id 9 for calling a global function with example usage: test_tree_with_categories_below_max_category_values() without return types