@staticmethod
def get_port_name_from_id(node_id, port_id, nodes):
    """
        Get the name of a port for a given node and port ID

        :param int node_id: node ID
        :param int port_id: port ID
        :param list nodes: list of nodes from :py:meth:`generate_nodes`
        :return: port name
        :rtype: str
        """
    port_name = ''
    for node in nodes:
        if node['id'] == node_id:
            for port in node['ports']:
                if port['id'] == port_id:
                    port_name = port['name']
                    break
    return port_name
