Implement write with internal buffer | Datadog Coding Question