<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_ip_range(self):
 """ Fetches IpRange instance if request IP is found in database. :param request: A ususal request object :type request: HttpRequest :return: IpRange object or None """

        ip = self._get_real_ip()
        try:
            geobase_entry = IpRange.objects.by_ip(ip)
        except IpRange.DoesNotExist:
            geobase_entry = None
        return geobase_entry