code: def run_tree_to_df_categorical(self, tree_method: str) -> None:
      X, y = tm.make_categorical(100, 10, 31, False)
      Xy = xgb.DMatrix(X, y, enable_categorical=True)
      booster = xgb.train(
          {"tree_method": tree_method}, Xy, num_boost_round=10
      )
      df = booster.trees_to_dataframe()
      for _, x in df.iterrows():
          if x["Feature"] != "Leaf":
              assert len(x["Category"]) >= 1
  
file_path: xgboost/tests/python/test_parse_tree.py
imports: import numpy
  import pytest
  import xgboost
  from xgboost import testing
label_desc: Use image node_id 4 for calling the TestTreesToDataFrame obj's underlying member method code with example usage: obj.run_tree_to_df_categorical(tree_method) without return types