<gh_stars>1-10
from functions.get_nag_vertex_type import get_nag_vertex_type
from functions.get_nag_vertex_number import get_nag_vertex_number

def to_tuple(a,b):
    return (a,b)

l = ['c0', 'c1', 'i1', 'n1', 'o1', 'i2', 'n2', 'n3']

print(sorted(l, key=lambda n: (get_nag_vertex_type(n), get_nag_vertex_number(n))))

from functions.get_nag_vertex_type import get_nag_vertex_type
from functions.get_nag_vertex_number import get_nag_vertex_number

def to_tuple(a,b):
    return (a,b)

l = ['c0', 'c1', 'i1', 'n1', 'o1', 'i2', 'n2', 'n3']

print(sorted(l, key=lambda n: (get_nag_vertex_type(n), get_nag_vertex_number(n))))