code: def save_model(self, fname):
          
          if isinstance(fname, STRING_TYPES):  # assume file name
              _check_call(_LIB.XGBoosterSaveModel(self.handle, c_str(fname)))
          else:
              raise TypeError("fname must be a string")
docs: Save the model to a file.
  
          The model is saved in an XGBoost internal binary format which is
          universal among the various XGBoost interfaces. Auxiliary attributes of
          the Python Booster object (such as feature_names) will not be saved.
          To preserve all attributes, pickle the Booster object.
  
          Parameters
          ----------
          fname : string
              Output file name