#NEWLINE# def _format_network_security_group_rules( sg_rules ) : #NEWLINE# #INDENT# for sg_rule in sg_rules : #NEWLINE# #INDENT# empty_keys = [ k for ( k , v ) in six . iteritems ( sg_rule ) if ( not v ) ] #NEWLINE# for key in empty_keys : #NEWLINE# #INDENT# sg_rule . pop ( key ) #NEWLINE# #UNINDENT# sg_rule . pop ( 'security_group_id' , None ) #NEWLINE# sg_rule . pop ( 'tenant_id' , None ) #NEWLINE# #UNINDENT# return utils . format_list_of_dicts ( v )