code: def response_path_as_list(path: ResponsePath) -> List[Union[str, int]]:
      
      flattened: List[Union[str, int]] = []
      append = flattened.append
      curr: Optional[ResponsePath] = path
      while curr:
          append(curr.key)
          curr = curr.prev
      return flattened[::-1]
docs: Get response path as a list.
  
      Given a ResponsePath (found in the `path` entry in the information provided as the
      last argument to a field resolver), return a list of the path keys.