docstr: Sets the embedding ID in the API client to the latest embedding ID in the current dataset.
  
  :meta private:  # Skip docstring generation
docstr_tok: ["Sets","the","embedding","ID","in","the","API","client","to","the","latest","embedding","ID","in","the","current","dataset",".",":","meta","private",":","#","Skip","docstring","generation"]
code: def set_embedding_id_to_latest(self) -> None:
      """Sets the embedding ID in the API client to the latest embedding ID in the current dataset.
  
      :meta private:  # Skip docstring generation
      """
      embeddings_on_server: List[
          DatasetEmbeddingData
      ] = self._embeddings_api.get_embeddings_by_dataset_id(
          dataset_id=self.dataset_id
      )
      if len(embeddings_on_server) == 0:
          raise RuntimeError(
              f"There are no known embeddings for dataset_id {self.dataset_id}."
          )
      # return first entry as the API returns newest first
      self.embedding_id = embeddings_on_server[0].id
  
file_path: lightly/lightly/api/api_workflow_upload_embeddings.py
imports: import csv
  import io
  import tempfile
  import urllib.request
  from datetime import datetime
  from typing import List
  from urllib.request import Request
  from lightly.api.utils import retry
  from lightly.openapi_generated.swagger_client.models import DatasetEmbeddingData, DimensionalityReductionMethod, Trigger2dEmbeddingJobRequest, WriteCSVUrlData
  from lightly.utils import io
label_desc: Use image node_id 2 for calling the _UploadEmbeddingsMixin obj's underlying member method code with example usage: obj.set_embedding_id_to_latest() without return types