<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pbkdf2(seed: str or bytes, dk_len: int) -> bytes: """ Derive one key from a seed. :param seed: the secret pass phrase to generate the keys from. :param dk_len: the length in bytes of every derived key. :return: """

    key = b''
    index = 1
    bytes_seed = str_to_bytes(seed)
    while len(key) < dk_len:
        key += Digest.sha256(b''.join([bytes_seed, index.to_bytes(4, 'big', signed=True)]))
        index += 1
    return key[:dk_len]