code: def _append_param_insert_pk_no_returning(
      compiler, stmt, c, values, kw
  ):
      """Create a primary key expression in the INSERT statement where
      we want to populate result.inserted_primary_key and we cannot use
      RETURNING.
  
      Depending on the kind of default here we may create a bound parameter
      in the INSERT statement and pre-execute a default generation function,
      or we may use cursor.lastrowid if supported by the dialect.
  
  
      """
  
      if (
          # column has a Python-side default
          c.default is not None
          and (
              # and it either is not a sequence, or it is and we support
              # sequences and want to invoke it
              not c.default.is_sequence
              or (
                  compiler.dialect.supports_sequences
                  and (
                      not c.default.optional
                      or not compiler.dialect.sequences_optional
                  )
              )
          )
      ) or (
          # column is the "autoincrement column"
          c is stmt.table._autoincrement_column
          and (
              # dialect can't use cursor.lastrowid
              not compiler.dialect.postfetch_lastrowid
              and (
                  # column has a Sequence and we support those
                  (
                      c.default is not None
                      and c.default.is_sequence
                      and compiler.dialect.supports_sequences
                  )
                  or
                  # column has no default on it, but dialect can run the
                  # "autoincrement" mechanism explicitly, e.g. PostgreSQL
                  # SERIAL we know the sequence name
                  (
                      c.default is None
                      and compiler.dialect.preexecute_autoincrement_sequences
                  )
              )
          )
      ):
          # do a pre-execute of the default
          values.append(
              (
                  c,
                  compiler.preparer.format_column(c),
                  _create_insert_prefetch_bind_param(compiler, c, **kw),
                  (c.key,),
              )
          )
      elif (
          c.default is None
          and c.server_default is None
          and not c.nullable
          and c is not stmt.table._autoincrement_column
      ):
          # no .default, no .server_default, not autoincrement, we have
          # no indication this primary key column will have any value
          _warn_pk_with_no_anticipated_value(c)
      elif compiler.dialect.postfetch_lastrowid:
          # finally, where it seems like there will be a generated primary key
          # value and we haven't set up any other way to fetch it, and the
          # dialect supports cursor.lastrowid, switch on the lastrowid flag so
          # that the DefaultExecutionContext calls upon cursor.lastrowid
          compiler.postfetch_lastrowid = True
  
imports: from __future__ import annotations
  import functools
  import operator
  from typing import Any
  from typing import Callable
  from typing import cast
  from typing import Dict
  from typing import Iterable
  from typing import List
  from typing import MutableMapping
  from typing import NamedTuple
  from typing import Optional
  from typing import overload
  from typing import Sequence
  from typing import Set
  from typing import Tuple
  from typing import TYPE_CHECKING
  from typing import Union
  from .None import coercions
  from .None import dml
  from .None import elements
  from .None import roles
  from .base import _DefaultDescriptionTuple
  from .dml import isinsert
  from .elements import ColumnClause
  from .schema import default_is_clause_element
  from .schema import default_is_sequence
  from .selectable import Select
  from .selectable import TableClause
  from ..None import exc
  from ..None import util
  from ..util.typing import Literal
label_desc: Use image node_id 13 for calling a global function with example usage: _append_param_insert_pk_no_returning(compiler, stmt, c, values, kw) without return types