<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def assign_contributor_permissions(obj, contributor=None):
 """Assign all permissions to object's contributor."""

    for permission in get_all_perms(obj):
        assign_perm(permission, contributor if contributor else obj.contributor, obj)