In the helper function sel(name), if v[name] is a null tensor, an index error will be raised.
In the helper function sel(name), if v[name] is a null tensor, an index error will be raised.