def dataclass_instance_from_dict(cls: Type[T], data: dict) -> T:
    """Create a dataclass instance from a dictionary, ignoring extra keys found in the dictionary."""

    field_names = set(f.name for f in fields(cls))
    return cls(**{k: v for k, v in data.items() if k in field_names})
Create a dataclass instance from a dictionary, ignoring extra keys found in the dictionary.
argilla/src/argilla/_helpers/_dataclasses.py