<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def user_in_group(user, group):
 """Returns True if the given user is in given group"""

    if isinstance(group, Group):
        return user_is_superuser(user) or group in user.groups.all()
    elif isinstance(group, six.string_types):
        return user_is_superuser(user) or user.groups.filter(name=group).exists()
    raise TypeError("'group' argument must be a string or a Group instance")