code: def _del_lock(end_state: NettingChannelEndState, secrethash: SecretHash) -> None:
      
      assert is_lock_pending(end_state, secrethash)
  
      _del_unclaimed_lock(end_state, secrethash)
  
      if secrethash in end_state.secrethashes_to_onchain_unlockedlocks:
          del end_state.secrethashes_to_onchain_unlockedlocks[secrethash]
docs: Removes the lock from the indexing structures.
  
      Note:
          This won't change the merkletree!