def pull(self, max_records: Optional[int] = None) -> "FeedbackDataset":
        """Pulls the dataset from Argilla and returns a local instance of it.

        Args:
            max_records: the maximum number of records to pull from Argilla. Defaults to `None`.

        Returns:
            A local instance of the dataset which is a `FeedbackDataset` object.
        """
        # Importing here to avoid circular imports
        from argilla_v1.client.feedback.dataset.local.dataset import FeedbackDataset

        instance = FeedbackDataset(
            fields=[field.to_local() for field in self.fields],
            questions=[question.to_local() for question in self.questions],
            guidelines=self.guidelines or None,
            metadata_properties=[metadata_property.to_local() for metadata_property in self.metadata_properties]
            or None,
            vectors_settings=[vector_settings.to_local() for vector_settings in self.vectors_settings] or None,
            allow_extra_metadata=self._allow_extra_metadata,
        )

        len_records = len(self._records)
        if len_records > 0:
            max_records = max_records or len_records
            records = [record.to_local() for record in self._records[:max_records]]
            instance.add_records(records=records)
        else:
            warnings.warn(
                "The dataset is empty, so no records will be added to the local instance.",
                UserWarning,
                stacklevel=1,
            )

        return instance
Pulls the dataset from Argilla and returns a local instance of it.

        Args:
            max_records: the maximum number of records to pull from Argilla. Defaults to `None`.

        Returns:
            A local instance of the dataset which is a `FeedbackDataset` object.
        
argilla-v1/src/argilla_v1/client/feedback/dataset/remote/dataset.py