docstr: Unmask ``password``, ``private_key`` and ``private_key_password`` before updating.
  
  When a database is edited the user sees a masked version of
  the aforementioned fields.
  
  The masked values should be unmasked before the ssh tunnel is updated.
docstr_tok: ["Unmask","``","password","``",",","``","private_key","``","and","``","private_key_password","``","before","updating",".","When","a","database","is","edited","the","user","sees","a","masked","version","of","the","aforementioned","fields",".","The","masked","values","should","be","unmasked","before","the","ssh","tunnel","is","updated","."]
code: def update(
      cls,
      item: SSHTunnel | None = None,
      attributes: dict[str, Any] | None = None,
      commit: bool = True,
  ) -> SSHTunnel:
      """
      Unmask ``password``, ``private_key`` and ``private_key_password`` before updating.
  
      When a database is edited the user sees a masked version of
      the aforementioned fields.
  
      The masked values should be unmasked before the ssh tunnel is updated.
      """
      # ID cannot be updated so we remove it if present in the payload
  
      if item and attributes:
          attributes.pop("id", None)
          attributes = unmask_password_info(attributes, item)
  
      return super().update(item, attributes, commit)
  
imports: from __future__ import annotations
  import logging
  from typing import Any
  from superset.daos.base import BaseDAO
  from superset.databases.filters import DatabaseFilter
  from superset.databases.ssh_tunnel.models import SSHTunnel
  from superset.extensions import db
  from superset.models.core import Database
  from superset.models.dashboard import Dashboard
  from superset.models.slice import Slice
  from superset.models.sql_lab import TabState
  from superset.utils.core import DatasourceType
  from superset.utils.ssh_tunnel import unmask_password_info
label_desc: Use image node_id 1 for calling the SSHTunnelDAO obj's underlying member method code with example usage: obj.update(cls, item, attributes, commit) and returns: super