<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clear_callbacks(obj):
 """Remove all callbacks from an object."""

    callbacks = obj._callbacks
    if isinstance(callbacks, dllist):
        # Help the garbage collector by clearing all links.
        callbacks.clear()
    obj._callbacks = None