def is_lock_pending(
        end_state: NettingChannelEndState,
        secrethash: SecretHash,
) -> bool:
    """True if the `secrethash` corresponds to a lock that is pending to be claimed
    and didn't expire.
    """
    return (
        secrethash in end_state.secrethashes_to_lockedlocks or
        secrethash in end_state.secrethashes_to_unlockedlocks or
        secrethash in end_state.secrethashes_to_onchain_unlockedlocks
    )
True if the `secrethash` corresponds to a lock that is pending to be claimed
    and didn't expire.