<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def weakref_proxy(obj):
 """returns either a weakref.proxy for the object, or if object is already a proxy, returns itself."""

    if type(obj) in weakref.ProxyTypes:
        return obj
    else:
        return weakref.proxy(obj)