<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def lazy(func):
 """ Decorator, which can be used for lazy imports @lazy def yaml():
 import yaml return yaml """

    try:
        frame = sys._getframe(1)
    except Exception:
        _locals = None
    else:
        _locals = frame.f_locals
    func_name = func.func_name if six.PY2 else func.__name__
    return LazyStub(func_name, func, _locals)