<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _getEventFromUid(self, request, uid):
 """Try and find an event with the given UID in this site."""

        event = getEventFromUid(request, uid) # might raise ObjectDoesNotExist
        home = request.site.root_page
        if event.get_ancestors().filter(id=home.id).exists():
            # only return event if it is in the same site
            return event