def METHOD_NAME(name):
    """
    Helper function which extracts test type (eval or train), model,
    device, and mode from the test full name.
    """
    test, model_name, device, mode = re.match(r"test_(.*)\[(.*)\-(.*)\-(.*)\]", name).groups()
    return (test, model_name, device, mode)