code: def __init__(self, model, *args, **kwargs):
      model_dump = model.get_booster().get_dump(dump_format="json")
      if len(model_dump) == 1 and all(
          i in json.loads(model_dump[0]) for i in ("weight", "bias")
      ):
          self.assembler = XGBoostLinearModelAssembler(model)
      else:
          self.assembler = XGBoostTreeModelAssembler(
              model, *args, **kwargs
          )
  
imports: import json
  import math
  import numpy
  from m2cgen import ast
  from m2cgen.assemblers import utils
  from m2cgen.assemblers.base import ModelAssembler
  from m2cgen.assemblers.linear import _linear_to_ast
label_desc: Use image node_id 1 to create a new XGBoostModelAssemblerSelector object from inherited base classes: ModelAssembler with example: obj = XGBoostModelAssemblerSelector(model)