code: def from_dict(d: Dict[str, Any]) -> "SQLConfig":
      for k in (
          "host",
          "port",
          "user",
          "password",
          "instance",
          "connection_name",
          "ssl-ca",
          "ssl-mode",
      ):
          assert k in d, f"{k} should be in {d}"
          assert d[k] is not None, f"{k} should not be None in {d}"
      return SQLConfig(
          host=d["host"],
          port=d["port"],
          user=d["user"],
          password=d["password"],
          instance=d["instance"],
          connection_name=d["connection_name"],
          db=d.get("db"),
          ssl_ca=d["ssl-ca"],
          ssl_cert=d.get("ssl-cert"),
          ssl_key=d.get("ssl-key"),
          ssl_mode=d["ssl-mode"],
      )
  
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 7 for calling the SQLConfig obj's underlying member method code with example usage: obj.from_dict(d) and returns: SQLConfig