code: async def make_response(self, request, response):
          
          while iscoroutine(response):
              response = await response
  
          if isinstance(response, StreamResponse):
              return response
  
          if isinstance(response, str):
              return Response(text=response, content_type='text/html')
  
          if isinstance(response, bytes):
              return Response(body=response, content_type='text/html')
  
          return Response(text=json.dumps(response), content_type='application/json')
docs: Convert a handler result to web response.