code: def entries(obj: Any) -> Iterable[tuple[str, Any]]:
      """Iterate over a dataclass' fields and their values."""
      if is_dataclass(obj):
          for f in fields(obj):
              value = getattr(obj, f.name)
              if value is not Unspecified:
                  yield (f.name, value)
      else:
          raise TypeError(f"expected a dataclass, got {type(obj)}")
  
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 1 for calling a global function with example usage: entries(obj) without return types