code: def response_from_mixed(mixed):
      
  
      # if none then give empty Response
      if mixed is None:
          return Response()
  
      # if not Response, then treat like body
      if not isinstance(mixed, Response):
          return Response(mixed)
  
      # it's already a Response
      return mixed
docs: Create Response from mixed input.