import re


def parse_trained_models(argv):
    """Parse @syntax for specifying trained models on the command line.
    """
    names = []
    for part in argv:
        if re.match("^@[a-zA-Z0-9_-]+$", part):
            names.append(part[1:])
        else:
            break
    rest = argv[len(names):]
    return names, rest