from @Eta0 in https://github.com/coreweave/tensorizer/pull/127#pullrequestreview-2133569874 Turn `TensorSerializer` into a context manager to match with `TensorDeserializer`