code: def file_response(data: Union[bytes, str],  # HttpResponse encodes str if req'd
                    content_type: str,
                    filename: str) -> HttpResponse:
      
      response = HttpResponse(data, content_type=content_type)
      add_download_filename(response, filename)
      return response
docs: Returns an ``HttpResponse`` with an attachment containing the specified
      data with the specified filename as an attachment.