code: def geo_location(ip_address):
      
      try:
          type(ipaddress.ip_address(ip_address))
      except ValueError:
          return {}
  
      data = requests.get(
          'https://ipapi.co/{}/json/'.format(ip_address), timeout=5).json()
      return data
docs: Get the Geolocation of an IP address.