Write the output to the given file.
Accepts a filename or any path-like object, e.g. pathlib.Path
Note: if you want to stream the data to the file instead of writing
all at once then you should use .with_streaming_response when making
the API request, e.g. .with_streaming_response.get_binary_response()