human
I am working on the file "Other functional features.ipynb".
The first task is:
To iste by fungovalo aj na "objekt" vytvoreny pomocou closure
Can you write Python code for it?
assistant
#Here is the Python code you requested.

import pyrsistent as ps

def Tovar(typ, mnozstvo):
    def write():
        return '{}: {}'.format(typ, mnozstvo)
    return ps.freeze({'write': write})

Jablko = partial(Tovar, 'jablka')
Jablko(5).write()