def m ( name = '' , * * kwargs ) : with Reflect . context ( * * kwargs ) as r : kwargs [ "name" ] = name instance = M_CLASS ( r , stream , * * kwargs ) instance ( )
how to profile object memory python3
Print out memory usage at this point in time
def m(name='', **kwargs):
    """
    Print out memory usage at this point in time

    http://docs.python.org/2/library/resource.html
    http://stackoverflow.com/a/15448600/5006
    http://stackoverflow.com/questions/110259/which-python-memory-profiler-is-recommended
    """
    with Reflect.context(**kwargs) as r:
        kwargs["name"] = name
        instance = M_CLASS(r, stream, **kwargs)
        instance()