code: def is_dataclass(obj: Any) -> bool:
      return hasattr(type(obj), "__dataclass_fields__")
  
file_path: bokeh/src/bokeh/util/dataclasses.py
imports: from __future__ import annotations
  import logging
  from dataclasses import dataclass, field, fields
  from typing import TYPE_CHECKING, Any, Iterable, TypeVar, Union
label_desc: Use image node_id 2 for calling a global function with example usage: is_dataclass(obj) and returns: hasattr