docstr: Gets the filenames of samples under a tag.
  
  Args:
      tag_data:
          Information about the tag.
      filenames_on_server:
          List of all filenames on the server. If they are not given,
          they need to be downloaded, which is a time-consuming operation.
      exclude_parent_tag:
          Excludes the parent tag in the returned filenames.
  
  Returns:
      Filenames of all samples under the tag.
  
  Examples:
      >>> client = ApiWorkflowClient(token="MY_AWESOME_TOKEN")
      >>>
      >>> # Already created some Lightly Worker runs with this dataset
      >>> client.set_dataset_id_by_name("my-dataset")
      >>> tag = client.get_tag_by_name("cool-tag")
      >>> client.get_filenames_in_tag(tag_data=tag)
      ['image-1.png', 'image-2.png']
  
  :meta private:  # Skip docstring generation
docstr_tok: ["Gets","the","filenames","of","samples","under","a","tag",".","Args",":","tag_data",":","Information","about","the","tag",".","filenames_on_server",":","List","of","all","filenames","on","the","server",".","If","they","are","not","given",",","they","need","to","be","downloaded",",","which","is","a","time-consuming","operation",".","exclude_parent_tag",":","Excludes","the","parent","tag","in","the","returned","filenames",".","Returns",":","Filenames","of","all","samples","under","the","tag",".","Examples",":",">",">",">","client","=","ApiWorkflowClient","(","token=","''","MY_AWESOME_TOKEN","''",")",">",">",">",">",">",">","#","Already","created","some","Lightly","Worker","runs","with","this","dataset",">",">",">","client.set_dataset_id_by_name","(","``","my-dataset","''",")",">",">",">","tag","=","client.get_tag_by_name","(","``","cool-tag","''",")",">",">",">","client.get_filenames_in_tag","(","tag_data=tag",")","[","'image-1.png","'",",","'image-2.png","'","]",":","meta","private",":","#","Skip","docstring","generation"]
code: def get_filenames_in_tag(
      self,
      tag_data: TagData,
      filenames_on_server: List[str] = None,
      exclude_parent_tag: bool = False,
  ) -> List[str]:
      """Gets the filenames of samples under a tag.
  
      Args:
          tag_data:
              Information about the tag.
          filenames_on_server:
              List of all filenames on the server. If they are not given,
              they need to be downloaded, which is a time-consuming operation.
          exclude_parent_tag:
              Excludes the parent tag in the returned filenames.
  
      Returns:
          Filenames of all samples under the tag.
  
      Examples:
          >>> client = ApiWorkflowClient(token="MY_AWESOME_TOKEN")
          >>>
          >>> # Already created some Lightly Worker runs with this dataset
          >>> client.set_dataset_id_by_name("my-dataset")
          >>> tag = client.get_tag_by_name("cool-tag")
          >>> client.get_filenames_in_tag(tag_data=tag)
          ['image-1.png', 'image-2.png']
  
      :meta private:  # Skip docstring generation
      """
  
      if exclude_parent_tag:
          parent_tag_id = tag_data.prev_tag_id
          tag_arithmetics_request = TagArithmeticsRequest(
              tag_id1=tag_data.id,
              tag_id2=parent_tag_id,
              operation=TagArithmeticsOperation.DIFFERENCE,
          )
          bit_mask_response: TagBitMaskResponse = (
              self._tags_api.perform_tag_arithmetics_bitmask(
                  tag_arithmetics_request=tag_arithmetics_request,
                  dataset_id=self.dataset_id,
              )
          )
          bit_mask_data = bit_mask_response.bit_mask_data
      else:
          bit_mask_data = tag_data.bit_mask_data
  
      if not filenames_on_server:
          filenames_on_server = self.get_filenames()
  
      filenames_tag = BitMask.from_hex(
          bit_mask_data
      ).masked_select_from_list(filenames_on_server)
  
      return filenames_tag
  
file_path: lightly/lightly/api/api_workflow_tags.py
imports: from typing import *
  from lightly.api.bitmask import BitMask
  from lightly.openapi_generated.swagger_client.models import TagArithmeticsOperation, TagArithmeticsRequest, TagBitMaskResponse, TagCreateRequest, TagData
label_desc: Use image node_id 4 for calling the _TagsMixin obj's underlying member method code with example usage: obj.get_filenames_in_tag(tag_data, filenames_on_server, exclude_parent_tag) and returns: filenames_tag