<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_restricted_sites(self, request):
 """ The sites on which the user has permission on. To return the permissions, the method check for the ``get_sites`` method on the user instance (e.g.: ``return request.user.get_sites()``) which must return the queryset of enabled sites. If the attribute does not exists, the user is considered enabled for all the websites. :param request: current request :return: boolean or a queryset of available sites """

        try:
            return request.user.get_sites()
        except AttributeError:  # pragma: no cover
            return Site.objects.none()