(obj)
return hasattr(cls, _FIELDS)
Returns True if obj is a dataclass or an instance of a
    dataclass.
Returns True if obj is a dataclass or an instance of a
    dataclass.
Returns True if obj is a dataclass or an instance of a dataclass .
def is_dataclass(obj):
    """Returns True if obj is a dataclass or an instance of a
    dataclass."""
    cls = obj if isinstance(obj, type) and not isinstance(obj, GenericAlias) else type(obj)
    return hasattr(cls, _FIELDS)
def is_dataclass ( obj ) : cls = obj if isinstance ( obj , type ) and not isinstance ( obj , GenericAlias ) else type ( obj ) return hasattr ( cls , _FIELDS )