code: def dataclassAsDict(obj) -> dict:
      """
      Return dataclass values as ``dict``.
      This is a non-recursive variant of ``dataclasses.asdict``.
      """
      if not is_dataclass(obj):
          raise TypeError(f"Object {obj} is not a dataclass")
      return {
          field.name: getattr(obj, field.name) for field in fields(obj)
      }
  
imports: import asyncio
  import datetime
  import logging
  import math
  import signal
  import sys
  import time
  from dataclasses import fields, is_dataclass
  from typing import AsyncIterator, Awaitable, Callable, Iterator, List, Optional, Union
  import eventkit
label_desc: Use image node_id 2 for calling a global function with example usage: dataclassAsDict(obj) and returns: unknown