Use @contextmanager with _parse_profile()