Get or create an entry using obtained information from an IP.

        Args:
            ip (str): IP address xxx.xxx.xxx.xxx.

        Returns:
            ip_info: an instance of IPInfo.

def get_or_create_from_ip(ip):
        """
        Get or create an entry using obtained information from an IP.

        Args:
            ip (str): IP address xxx.xxx.xxx.xxx.

        Returns:
            ip_info: an instance of IPInfo.
        """
        data = ip_api_handler.get(ip)
        if data and any(v for v in data.values()):
            if data.get('ip_address', None) is None or not data['ip_address']:
                data['ip_address'] = ip
            return IPInfo.objects.get_or_create(**data)
        return None, False