Removed unnecessary context manager from measurement.py