def get_ip_version(network):
 if (netaddr.IPNetwork(network).version == 6):
  return 'IPv6'
 elif (netaddr.IPNetwork(network).version == 4):
  return 'IPv4'

def get_ip_version ( network ) : if ( netaddr . IPNetwork ( network ) . version == 6 ) : return 'IPv6' elif ( netaddr . IPNetwork ( network ) . version == 4 ) : return 'IPv4'
returns the ip version of a network .