def variable_parser(var_list, prefix):
    """return a subset of the all_variables by prefix"""
    ret_list = []
    for var in var_list:
        varname = var.name
        varprefix = varname.split('/')[0]
        if varprefix == prefix:
            ret_list.append(var)
    return ret_list