docs: def normalize_with_model(vector, model):
      r"""
      Normalize as with `normalize`, but not based on the data of the passed feature
      vector, but rather on a learned model created with `normalize`. Thus formerly
      unseen query data can be normalized according to the training data.
      
      Parameters
      ----------
      vector : sequence
          A sequence of feature vectors to normalize.
      model : tuple
          A normalization model created with `normalize`.
      
      Returns
      -------
      normalize : ndarray
          The normalized versions of the input vectors.
      """
      vector = numpy.array(vector, dtype=numpy.float)
      
      # unpack model
      minp, maxp, minv, maxv = model
      
      # add a singleton dimension if required
      if 1 == vector.ndim:
          vector = vector[:, None]
      
      # shift outliers to fit range
      for i in range(vector.shape[1]):
          vector[:,i][vector[:,i] < minp[i]] = minp[i]
          vector[:,i][vector[:,i] > maxp[i]] = maxp[i]
          
      # normalize
      vector -= minv
      vector /= maxv
      
      return vector