code: def _deserialize_conn_config(
      conn_config: presto_config_pb2.PrestoConnConfig,
  ) -> prestodb.dbapi.Connection:
      """Deserializes Presto connection config to Presto client.
  
      Args:
        conn_config: Protobuf-encoded connection config for Presto client.
  
      Returns:
        A prestodb.dbapi.Connection instance initialized with user-supplied
        parameters.
      """
      params = {"host": conn_config.host}  # Required field
      # Only deserialize rest of parameters if set by user
      if conn_config.HasField("port"):
          params["port"] = conn_config.port
      if conn_config.HasField("user"):
          params["user"] = conn_config.user
      if conn_config.HasField("source"):
          params["source"] = conn_config.source
      if conn_config.HasField("catalog"):
          params["catalog"] = conn_config.catalog
      if conn_config.HasField("schema"):
          params["schema"] = conn_config.schema
      if conn_config.HasField("http_scheme"):
          params["http_scheme"] = conn_config.http_scheme
      if conn_config.WhichOneof("opt_auth"):
          params["auth"] = _deserialize_auth_config(conn_config)
      if conn_config.HasField("max_attempts"):
          params["max_attempts"] = conn_config.max_attempts
      if conn_config.HasField("request_timeout"):
          params["request_timeout"] = conn_config.request_timeout
  
      return prestodb.dbapi.connect(**params)
  
imports: import datetime
  from typing import Any, Dict, Iterable, Tuple
  import apache_beam
  import prestodb
  import tensorflow
  from tfx.components.example_gen import base_example_gen_executor
  from tfx.examples.custom_components.presto_example_gen.proto import presto_config_pb2
  from tfx.proto import example_gen_pb2
  from tfx.utils import proto_utils
label_desc: Use image node_id 1 for calling a global function with example usage: _deserialize_conn_config(conn_config) and returns: prestodb