<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_path(prev: Optional[ResponsePath], key: Union[str, int]) -> ResponsePath: """Add a key to a response path. Given a ResponsePath and a key, return a new ResponsePath containing the new key. """

    return ResponsePath(prev, key)