<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def response_path_as_list(path: ResponsePath) -> List[Union[str, int]]: """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. """

    flattened: List[Union[str, int]] = []
    append = flattened.append
    curr: Optional[ResponsePath] = path
    while curr:
        append(curr.key)
        curr = curr.prev
    return flattened[::-1]