def stats_variable_names(res):
    """Return the variable names for a stats object"""
    def varname(s):
        pos = s.find(':')
        return s if pos==-1 else s[0:pos]
    return set( [ varname(key) for key in res.keys()] )