code: def to_dict(self) -> Dict[str, Any]:
      d = {
          "host": self.host,
          "port": self.port,
          "user": self.user,
          "password": self.password,
          "instance": self.instance,
          "connection_name": self.connection_name,
          "ssl-ca": self.ssl_ca,
          "ssl-mode": self.ssl_mode,
      }
      if self.db is not None:
          d["db"] = self.db
      if self.using_mtls():
          d["ssl-cert"] = self.ssl_cert
          d["ssl-key"] = self.ssl_key
      return d
  
file_path: hail/hail/python/hailtop/auth/sql_config.py
imports: from typing import Dict, NamedTuple, Optional, Any
  import json
  import os
label_desc: Use image node_id 2 for calling the SQLConfig obj's underlying member method code with example usage: obj.to_dict() and returns: d