code: def is_secret_known(
          end_state: NettingChannelEndState,
          secrethash: SecretHash,
  ) -> bool:
      
      return (
          secrethash in end_state.secrethashes_to_unlockedlocks or
          secrethash in end_state.secrethashes_to_onchain_unlockedlocks
      )
docs: True if the `secrethash` is for a lock with a known secret.