code: def gateways_info():
      
      data = netifaces.gateways()
      results = {'default': {}}
  
      with suppress(KeyError):
          results['ipv4'] = data[netifaces.AF_INET]
          results['default']['ipv4'] = data['default'][netifaces.AF_INET]
      with suppress(KeyError):
          results['ipv6'] = data[netifaces.AF_INET6]
          results['default']['ipv6'] = data['default'][netifaces.AF_INET6]
  
      return results
docs: Returns gateways data.