<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_witness_for_key_prefix(db, node_hash, key):
 """ Get all witness given a keypath prefix. Include 1. witness along the keypath and 2. witness in the subtrie of the last node in keypath """

    validate_is_bytes(key)

    return tuple(_get_witness_for_key_prefix(db, node_hash, encode_to_bin(key)))