code: def unpack(rv):
      
      status = headers = None
      if isinstance(rv, tuple):
          rv, status, headers = rv + (None,) * (3 - len(rv))
      if isinstance(status, (dict, list)):
          headers, status = status, headers
      return (rv, status, headers)
docs: Convert rv to tuple(data, code, headers)
  
      Args:
          rv: data or tuple that contain code and headers
      Returns:
          tuple (rv, status, headers)