def _record_to_dict(record: Union["Record", Tuple["Record", float]], flatten=False) -> Dict[str, Any]:
        """Converts a Record object to a dictionary for export.
        Args:
            record (Record): The Record object or the record and the linked score to convert.
            flatten (bool): The structure of the exported dictionary.
                - True: The record fields, metadata, suggestions and responses will be flattened
                        so that their keys becomes the keys of the record dictionary, using
                        dot notation for nested keys. i.e. `label.suggestion` and `label.response`
                - False: The record fields, metadata, suggestions and responses will be nested as
                        dictionaries within the record dictionary. i.e. `label: {suggestion: ..., response: ...}`
        Returns:
            A dictionary representing the record.
        """
        if isinstance(record, tuple):
            record, score = record

            record_dict = GenericIO._record_to_dict(record, flatten)
            record_dict["score"] = score
            return record_dict

        record_dict = record.to_dict()
        if flatten:
            record_dict.update(
                **record_dict.pop("fields", {}),
                **record_dict.pop("metadata", {}),
                **record_dict.pop("vectors", {}),
            )

            record_dict.pop("responses")
            record_dict.pop("suggestions")

            responses_dict = defaultdict(list)
            for response in record.responses:
                responses_key = f"{response.question_name}.responses"
                responses_users_key = f"{responses_key}.users"
                responses_status_key = f"{responses_key}.status"

                responses_dict[responses_key].append(response.value)
                responses_dict[responses_users_key].append(str(response.user_id))
                responses_dict[responses_status_key].append(response.status.value if response.status else None)

            suggestions_dict = {}
            for suggestion in record.suggestions:
                suggestion_key = f"{suggestion.question_name}.suggestion"
                suggestion_agent_key = f"{suggestion_key}.agent"
                suggestion_score_key = f"{suggestion_key}.score"

                suggestions_dict.update(
                    {
                        suggestion_key: suggestion.value,
                        suggestion_score_key: suggestion.score,
                        suggestion_agent_key: suggestion.agent,
                    }
                )

            record_dict.update({**responses_dict, **suggestions_dict})
        return record_dict
Converts a Record object to a dictionary for export.
        Args:
            record (Record): The Record object or the record and the linked score to convert.
            flatten (bool): The structure of the exported dictionary.
                - True: The record fields, metadata, suggestions and responses will be flattened
                        so that their keys becomes the keys of the record dictionary, using
                        dot notation for nested keys. i.e. `label.suggestion` and `label.response`
                - False: The record fields, metadata, suggestions and responses will be nested as
                        dictionaries within the record dictionary. i.e. `label: {suggestion: ..., response: ...}`
        Returns:
            A dictionary representing the record.
        
argilla/src/argilla/records/_io/_generic.py