def __del__(self):
    with _sharded_tensor_lock:
        global _sharded_tensor_current_id, _sharded_tensor_map
        if (self._sharded_tensor_id in _sharded_tensor_map):
            _sharded_tensor_map.pop(self._sharded_tensor_id)
def __del__(self):
    with _sharded_tensor_lock:
        global _sharded_tensor_current_id, _sharded_tensor_map
        if (self._sharded_tensor_id in _sharded_tensor_map):
            _sharded_tensor_map.pop(self._sharded_tensor_id)