code: def load_model(self, fname):
          
          if isinstance(fname, STRING_TYPES):  # assume file name
              if os.path.exists(fname):
                  _LIB.XGBoosterLoadModel(self.handle, c_str(fname))
              else:
                  raise ValueError("No such file: {0}".format(fname))
          else:
              buf = fname
              length = ctypes.c_ulong(len(buf))
              ptr = (ctypes.c_char * len(buf)).from_buffer(buf)
              _check_call(_LIB.XGBoosterLoadModelFromBuffer(self.handle, ptr, length))
docs: Load the model from a file.
  
          Parameters
          ----------
          fname : string or a memory buffer
              Input file name or memory buffer(see also save_raw)