code: def serve_buffer(data: bytes,
                   offered_filename: str = None,
                   content_type: str = None,
                   as_attachment: bool = True,
                   as_inline: bool = False) -> HttpResponse:
      
      response = HttpResponse(data)
      add_http_headers_for_attachment(response,
                                      offered_filename=offered_filename,
                                      content_type=content_type,
                                      as_attachment=as_attachment,
                                      as_inline=as_inline,
                                      content_length=len(data))
      return response
docs: Serve up binary data from a buffer.
      Options as for ``serve_file()``.