code: def get_dump(self, fmap='', with_stats=False, dump_format="text"):
          
          length = c_bst_ulong()
          sarr = ctypes.POINTER(ctypes.c_char_p)()
          if self.feature_names is not None and fmap == '':
              flen = len(self.feature_names)
  
              fname = from_pystr_to_cstr(self.feature_names)
  
              if self.feature_types is None:
                  # use quantitative as default
                  # {'q': quantitative, 'i': indicator}
                  ftype = from_pystr_to_cstr(['q'] * flen)
              else:
                  ftype = from_pystr_to_cstr(self.feature_types)
              _check_call(_LIB.XGBoosterDumpModelExWithFeatures(
                  self.handle,
                  ctypes.c_int(flen),
                  fname,
                  ftype,
                  ctypes.c_int(with_stats),
                  c_str(dump_format),
                  ctypes.byref(length),
                  ctypes.byref(sarr)))
          else:
              if fmap != '' and not os.path.exists(fmap):
                  raise ValueError("No such file: {0}".format(fmap))
              _check_call(_LIB.XGBoosterDumpModelEx(self.handle,
                                                    c_str(fmap),
                                                    ctypes.c_int(with_stats),
                                                    c_str(dump_format),
                                                    ctypes.byref(length),
                                                    ctypes.byref(sarr)))
          res = from_cstr_to_pystr(sarr, length)
          return res
docs: Returns the model dump as a list of strings.
  
          Parameters
          ----------
          fmap : string, optional
              Name of the file containing feature map names.
          with_stats : bool, optional
              Controls whether the split statistics are output.
          dump_format : string, optional
              Format of model dump. Can be 'text' or 'json'.