def get_memory_mb():
        """Get current memory usage in MB."""
        process = psutil.Process(os.getpid())
        return process.memory_info().rss / 1024 / 1024
Get current memory usage in MB.
tests/unit/test_event_stream.py