code: def get_or_create_from_ip(ip):
          
          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
docs: 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.