def ConvBPDN(*args, **kwargs):
    """A wrapper function that dynamically defines a class derived from
    one of the implementations of the Convolutional Constrained MOD
    problems, and returns an object instantiated with the provided
    parameters. The wrapper is designed to allow the appropriate
    object to be created by calling this function using the same
    syntax as would be used if it were a class. The specific
    implementation is selected by use of an additional keyword
    argument 'method'. Valid values are:

    - ``'admm'`` :
      Use the implementation defined in :class:`.admm.cbpdn.ConvBPDN`.
    - ``'fista'`` :
      Use the implementation defined in :class:`.fista.cbpdn.ConvBPDN`.

    The default value is ``'admm'``.
    """

    # Extract method selection argument or set default
    method = kwargs.pop('method', 'admm')

    # Assign base class depending on method selection argument
    base = cbpdn_class_label_lookup(method)

    # Nested class with dynamically determined inheritance
    class ConvBPDN(base):
        def __init__(self, *args, **kwargs):
            super(ConvBPDN, self).__init__(*args, **kwargs)

    # Allow pickling of objects of type ConvBPDN
    _fix_dynamic_class_lookup(ConvBPDN, method)

    # Return object of the nested class type
    return ConvBPDN(*args, **kwargs)
def ConvBPDN ( * args , ** kwargs ) : method = kwargs . pop ( 'method' , 'admm' ) base = cbpdn_class_label_lookup ( method ) class ConvBPDN ( base ) : def __init__ ( self , * args , ** kwargs ) : super ( ConvBPDN , self ) . __init__ ( * args , ** kwargs ) _fix_dynamic_class_lookup ( ConvBPDN , method ) return ConvBPDN ( * args , ** kwargs )
A wrapper function that dynamically defines a class derived from
    one of the implementations of the Convolutional Constrained MOD
    problems, and returns an object instantiated with the provided
    parameters. The wrapper is designed to allow the appropriate
    object to be created by calling this function using the same
    syntax as would be used if it were a class. The specific
    implementation is selected by use of an additional keyword
    argument 'method'. Valid values are:

    - ``'admm'`` :
      Use the implementation defined in :class:`.admm.cbpdn.ConvBPDN`.
    - ``'fista'`` :
      Use the implementation defined in :class:`.fista.cbpdn.ConvBPDN`.

    The default value is ``'admm'``.