def _create_selection_create_request(
        self,
        selection_config: SelectionConfig,
        preselected_tag_id: Optional[str],
        query_tag_id: Optional[str],
    ) -> SamplingCreateRequest:
        """Creates a SamplingCreateRequest

        First, it checks how many samples are already labeled by
            getting the number of samples in the preselected_tag_id.
        Then the stopping_condition.n_samples
            is set to be the number of already labeled samples + the selection_config.batch_size.
        Last the SamplingCreateRequest is created with the necessary nested class instances.

        """

        sampling_config = SamplingConfig(
            stopping_condition=SamplingConfigStoppingCondition(
                n_samples=selection_config.n_samples,
                min_distance=selection_config.min_distance,
            )
        )
        sampling_create_request = SamplingCreateRequest(
            new_tag_name=selection_config.name,
            method=selection_config.method,
            config=sampling_config,
            preselected_tag_id=preselected_tag_id,
            query_tag_id=query_tag_id,
        )
        return sampling_create_request
Creates a SamplingCreateRequest

        First, it checks how many samples are already labeled by
            getting the number of samples in the preselected_tag_id.
        Then the stopping_condition.n_samples
            is set to be the number of already labeled samples + the selection_config.batch_size.
        Last the SamplingCreateRequest is created with the necessary nested class instances.

        
lightly/api/api_workflow_selection.py