def _get_ports(port_opts):
if port_opts in [Opt.preset, Opt.debug]:<EOL><INDENT>_preset_ports = [(<NUM_LIT:1>, '<STR_LIT>', catan.board.PortType.any3),<EOL>(<NUM_LIT:2>, '<STR_LIT>', catan.board.PortType.wood),<EOL>(<NUM_LIT:4>, '<STR_LIT>', catan.board.PortType.brick),<EOL>(<NUM_LIT:5>, '<STR_LIT>', catan.board.PortType.any3),<EOL>(<NUM_LIT:6>, '<STR_LIT>', catan.board.PortType.any3),<EOL>(<NUM_LIT:8>, '<STR_LIT>', catan.board.PortType.sheep),<EOL>(<NUM_LIT:9>, '<STR_LIT:E>', catan.board.PortType.any3),<EOL>(<NUM_LIT:10>, '<STR_LIT>', catan.board.PortType.ore),<EOL>(<NUM_LIT:12>, '<STR_LIT>', catan.board.PortType.wheat)]<EOL>return [catan.board.Port(tile, dir, port_type)<EOL>for tile, dir, port_type in _preset_ports]<EOL><DEDENT>elif port_opts in [Opt.empty, Opt.random]:<EOL><INDENT>logging.warning('<STR_LIT>'.format(port_opts))<EOL>return []<EOL><DEDENT>
Generate a list of ports using the given options.

port options supported:
- Opt.empty ->
- Opt.random ->
- Opt.preset -> ports are in default locations
- Opt.debug -> alias for Opt.preset

:param port_opts: Opt
:return: list(Port)