code: def getPcn(dsz, Nv, dimN=2, dimC=1, crp=False, zm=False):
      
  
      fncdict = {(False, False): _Pcn,
                 (False, True): _Pcn_zm,
                 (True, False): _Pcn_crp,
                 (True, True): _Pcn_zm_crp}
      fnc = fncdict[(crp, zm)]
      return functools.partial(fnc, dsz=dsz, Nv=Nv, dimN=dimN, dimC=dimC)
docs: Construct the constraint set projection function for convolutional
      dictionary update problem.
  
      Parameters
      ----------
      dsz : tuple
        Filter support size(s), specified using the same format as the `dsz`
        parameter of :func:`bcrop`
      Nv : tuple
        Sizes of problem spatial indices
      dimN : int, optional (default 2)
        Number of problem spatial indices
      dimC : int, optional (default 1)
        Number of problem channel indices
      crp : bool, optional (default False)
        Flag indicating whether the result should be cropped to the support
        of the largest filter in the dictionary.
      zm : bool, optional (default False)
        Flag indicating whether the projection function should include
        filter mean subtraction
  
      Returns
      -------
      fn : function
        Constraint set projection function