code: def get_labeled_images(
      self,
      label_tag: Optional[str] = None,
      labels: Optional[List[str]] = None,
  ) -> List[str]:
      datasets = self._client.search_for_series(
          search_filters={"Modality": "SEG"}
      )
      all_segs = [Dataset.from_json(ds) for ds in datasets]
  
      image_series = []
      for seg in all_segs:
          meta = self._client.retrieve_series_metadata(
              str(seg["StudyInstanceUID"].value),
              str(seg["SeriesInstanceUID"].value),
          )
          seg_meta = Dataset.from_json(meta[0])
          if seg_meta.get("ReferencedSeriesSequence"):
              referenced_series_instance_uid = str(
                  seg_meta["ReferencedSeriesSequence"]
                  .value[0]["SeriesInstanceUID"]
                  .value
              )
              if referenced_series_instance_uid in self.list_images():
                  image_series.append(referenced_series_instance_uid)
              else:
                  logger.warning(
                      "Label Ignored:: ReferencedSeriesSequence is NOT in filtered image list: {}".format(
                          str(seg["SeriesInstanceUID"].value)
                      )
                  )
          else:
              logger.warning(
                  "Label Ignored:: ReferencedSeriesSequence is NOT found: {}".format(
                      str(seg["SeriesInstanceUID"].value)
                  )
              )
      return image_series
  
imports: import logging
  import os
  import pathlib
  import shutil
  from typing import Any, Dict, Iterator, List, Optional, Tuple
  import requests
  from cachetools import TTLCache, cached
  from dicomweb_client import DICOMwebClient
  from pydicom.dataset import Dataset
  from monailabel.config import settings
  from monailabel.datastore.local import LocalDatastore
  from monailabel.datastore.utils.convert import binary_to_image, dicom_to_nifti, nifti_to_dicom_seg
  from monailabel.datastore.utils.dicom import dicom_web_download_series, dicom_web_upload_dcm
  from monailabel.interfaces.datastore import DefaultLabelTag
  from monailabel.utils.others.generic import md5_digest
label_desc: Use image node_id 8 for calling the DICOMWebDatastore obj's underlying member method code with example usage: obj.get_labeled_images(label_tag, labels) and returns: image_series