def semanage_port_get_ports(seport, setype, proto):
 records = seport.get_all_by_type()
 if ((setype, proto) in records):
  return records[(setype, proto)]
 else:
  return []

def semanage_port_get_ports ( seport , setype , proto ) : records = seport . get_all_by_type ( ) if ( ( setype , proto ) in records ) : return records [ ( setype , proto ) ] else : return [ ]
get the list of ports that have the specified type definition .