code: def load(file):
      """Load a fitted glm"""
      from os.path import splitext
  
      if splitext(file)[1] == "":
          file = file + ".npz"
      fmod = np.load(file)
      mod = glm()
      mod.beta = fmod["beta"]
      mod.nvbeta = fmod["nvbeta"]
      mod.s2 = fmod["s2"]
      mod.dof = fmod["dof"]
      mod.a = fmod["a"]
      mod.model = str(fmod["model"])
      mod.method = str(fmod["method"])
      mod._axis = int(fmod["axis"])
      mod._constants = list(fmod["constants"])
      return mod
  
imports: import numpy
  import scipy.stats
  from nipy.algorithms.statistics.utils import z_score
  from ..utils import mahalanobis
  from .None import kalman
label_desc: Use image node_id 2 for calling a global function with example usage: load(file) and returns: mod