#NEWLINE# @ classmethod #NEWLINE# def serialize_network_group( cls , instance , fields = None ) : #NEWLINE# #INDENT# data_dict = BasicSerializer . serialize ( instance , fields = ( fields if fields else cls . fields ) ) #NEWLINE# data_dict [ 'ip_ranges' ] = [ [ ir . first , ir . last ] for ir in instance . ip_ranges ] #NEWLINE# data_dict . setdefault ( 'gateway' , '' ) #NEWLINE# return cls