code: def _compare_server_default(
      autogen_context: AutogenContext,
      alter_column_op: AlterColumnOp,
      schema: Optional[str],
      tname: Union[quoted_name, str],
      cname: Union[quoted_name, str],
      conn_col: Column[Any],
      metadata_col: Column[Any],
  ) -> Optional[bool]:
      metadata_default = metadata_col.server_default
      conn_col_default = conn_col.server_default
      if conn_col_default is None and metadata_default is None:
          return False
  
      if sqla_compat._server_default_is_computed(metadata_default):
          # return False in case of a computed column as the server
          # default. Note that DDL for adding or removing "GENERATED AS" from
          # an existing column is not currently known for any backend.
          # Once SQLAlchemy can reflect "GENERATED" as the "computed" element,
          # we would also want to ignore and/or warn for changes vs. the
          # metadata (or support backend specific DDL if applicable).
          if not sqla_compat.has_computed_reflection:
              return False
  
          else:
              return _compare_computed_default(  # type:ignore[func-returns-value]
                  autogen_context,
                  alter_column_op,
                  schema,
                  tname,
                  cname,
                  conn_col,
                  metadata_col,
              )
      if sqla_compat._server_default_is_computed(conn_col_default):
          _warn_computed_not_supported(tname, cname)
          return False
  
      if sqla_compat._server_default_is_identity(
          metadata_default, conn_col_default
      ):
          alter_column_op.existing_server_default = conn_col_default
          diff, is_alter = _compare_identity_default(
              autogen_context,
              alter_column_op,
              schema,
              tname,
              cname,
              conn_col,
              metadata_col,
          )
          if is_alter:
              alter_column_op.modify_server_default = metadata_default
              if diff:
                  log.info(
                      "Detected server default on column '%s.%s': "
                      "identity options attributes %s",
                      tname,
                      cname,
                      sorted(diff),
                  )
      else:
          rendered_metadata_default = (
              _render_server_default_for_compare(
                  metadata_default, autogen_context
              )
          )
  
          rendered_conn_default = (
              cast(Any, conn_col_default).arg.text
              if conn_col_default
              else None
          )
  
          alter_column_op.existing_server_default = conn_col_default
  
          is_diff = (
              autogen_context.migration_context._compare_server_default(
                  conn_col,
                  metadata_col,
                  rendered_metadata_default,
                  rendered_conn_default,
              )
          )
          if is_diff:
              alter_column_op.modify_server_default = metadata_default
              log.info(
                  "Detected server default on column '%s.%s'",
                  tname,
                  cname,
              )
  
      return None
  
imports: from __future__ import annotations
  import contextlib
  import logging
  import re
  from typing import Any
  from typing import cast
  from typing import Dict
  from typing import Iterator
  from typing import Mapping
  from typing import Optional
  from typing import Set
  from typing import Tuple
  from typing import TYPE_CHECKING
  from typing import TypeVar
  from typing import Union
  from sqlalchemy import event
  from sqlalchemy import inspect
  from sqlalchemy import schema
  from sqlalchemy import text
  from sqlalchemy import types
  from sqlalchemy.sql import expression
  from sqlalchemy.sql.schema import ForeignKeyConstraint
  from sqlalchemy.sql.schema import Index
  from sqlalchemy.sql.schema import UniqueConstraint
  from sqlalchemy.util import OrderedSet
  from ..None import util
  from ..ddl._autogen import is_index_sig
  from ..ddl._autogen import is_uq_sig
  from ..operations import ops
  from ..util import sqla_compat
label_desc: Use image node_id 19 for calling a global function with example usage: _compare_server_default(autogen_context, alter_column_op, schema, tname, cname, conn_col, metadata_col) and returns: None, False, False, False, _compare_computed_default