Should this be "not key.startswith('_')" instead of "'_' not in key"?