code: def to_json(self):
      data_json = {
          "cols": self.enc.cols,
          "dim": self.enc._dim,
          "mean": float(self.enc._mean),
          "feature_names": self.enc.get_feature_names_out(),
          "mapping": {},
      }
      for k, v in self.enc.mapping.items():
          data_json["mapping"][k] = v.to_json()
      return data_json
  
file_path: mljar-supervised/supervised/preprocessing/loo_encoder.py
imports: import copy
  import json
  import logging
  import warnings
  from decimal import Decimal
  import numpy
  import pandas
  from category_encoders.leave_one_out import LeaveOneOutEncoder
  from supervised.utils.config import LOG_LEVEL
label_desc: Use image node_id 4 for calling the LooEncoder obj's underlying member method code with example usage: obj.to_json() and returns: data_json