Then the code is wrong for another reason: the default value is not None for all the parameters (e.g. memory or memory_level)