code: def has_rowid(method: F) -> F:
      """
      Decorator that prevents updates/deletes on tables without a rowid.
      """
  
      @wraps(method)
      def wrapper(
          self: SupersetShillelaghAdapter, *args: Any, **kwargs: Any
      ) -> Any:
          # pylint: disable=protected-access
          if not self._rowid:
              raise ProgrammingError(
                  "Can only modify data in a table with a single, integer, primary key"
              )
          return method(self, *args, **kwargs)
  
      return cast(F, wrapper)
  
imports: from __future__ import annotations
  import datetime
  import decimal
  import operator
  import urllib.parse
  from collections.abc import Iterator
  from functools import partial, wraps
  from typing import Any, Callable, cast, TypeVar
  from flask import current_app
  from shillelagh.adapters.base import Adapter
  from shillelagh.backends.apsw.dialects.base import APSWDialect
  from shillelagh.exceptions import ProgrammingError
  from shillelagh.fields import Boolean, Date, DateTime, Field, Float, Integer, Order, String, Time
  from shillelagh.filters import Equal, Filter, Range
  from shillelagh.typing import RequestedOrder, Row
  from sqlalchemy import func, MetaData, Table
  from sqlalchemy.engine.url import URL
  from sqlalchemy.exc import NoSuchTableError
  from sqlalchemy.sql import Select, select
  from superset import db, feature_flag_manager, security_manager, sql_parse
label_desc: Use image node_id 2 for calling a global function with example usage: has_rowid(method) and returns: cast, method