code: def to_json(self):
      params = {}
      if (
          self._convert_method == PreprocessingCategorical.CONVERT_LOO
          and self._columns
      ):
          params = {
              "enc": self._enc.to_json(),
              "convert_method": self._convert_method,
              "columns": self._columns,
          }
      else:
          if len(self._convert_params) == 0:
              return {}
          params = {
              "convert_method": self._convert_method,
              "convert_params": self._convert_params,
              "columns": self._columns,
          }
      return params
  
file_path: mljar-supervised/supervised/preprocessing/preprocessing_categorical.py
imports: import json
  import os
  import numpy
  import pandas
  from supervised.preprocessing.label_binarizer import LabelBinarizer
  from supervised.preprocessing.label_encoder import LabelEncoder
  from supervised.preprocessing.loo_encoder import LooEncoder
  from supervised.preprocessing.preprocessing_utils import PreprocessingUtils
label_desc: Use image node_id 6 for calling the PreprocessingCategorical obj's underlying member method code with example usage: obj.to_json() and returns: params, dict