def attrs_json_dict(obj: Any) -> dict[str, Any]:
    """Return a dictionary suitable for `_json_dict_` from an attrs dataclass."""
    attribute_names = [f.name for f in attrs.fields(type(obj))]
    return obj_to_dict_helper(obj, attribute_names)
Return a dictionary suitable for `_json_dict_` from an attrs dataclass.
cirq-core/cirq/protocols/json_serialization.py