class_docstr: Have phi stft as callable w/o using a lambda that does not pickle.
class_docstr_tok: ["Have","phi","stft","as","callable","w\/o","using","a","lambda","that","does","not","pickle","."]
docstr: Squared L2 norm if ord == 2 and L1 norm if order == 1.
docstr_tok: ["Squared","L2","norm","if","ord","==","2","and","L1","norm","if","order","==","1","."]
code: def norm(self, z, ord=2):
      """Squared L2 norm if ord == 2 and L1 norm if order == 1."""
      if ord not in (1, 2):
          raise ValueError(
              "Only supported norm order are 1 and 2. "
              "Got ord = %s" % ord
          )
      stft_norm = stft_norm1 if ord == 1 else stft_norm2
      norm = 0.0
      if len(self.n_coefs) > 1:
          z_ = np.array_split(
              np.atleast_2d(z), np.cumsum(self.n_coefs)[:-1], axis=1
          )
      else:
          z_ = [np.atleast_2d(z)]
      for i in range(len(z_)):
          norm += stft_norm(
              z_[i].reshape(-1, self.n_freqs[i], self.n_steps[i])
          )
      return norm
  
imports: import functools
  from math import sqrt
  import numpy
  from ..time_frequency._stft import istft, stft, stft_norm1, stft_norm2
  from ..utils import _check_option, _get_blas_funcs, _validate_type, logger, sum_squared, verbose, warn
  from .mxne_debiasing import compute_bias
label_desc: Use image node_id 3 for calling the _Phi obj's underlying member method code with example usage: obj.norm(z, ord) and returns: norm