def _mock_write_jsonl(filename: str):
    """Writes a mock .jsonl file to filename."""

    def _inner(*_: Any, **__: Any):
        base, ___ = os.path.split(filename)
        os.makedirs(base, exist_ok=True)
        with open(filename, 'w') as f:
            f.write(json.dumps({'prompt': 'prompt', 'response': 'response'}))

        assert os.path.exists(filename)

    return _inner
Writes a mock .jsonl file to filename.
tests/a_scripts/data_prep/test_convert_delta_to_json.py