docs: def _get_item_labels(self, item, no_from_study=False):
          """
          Returns the labels for the XNAT subject and sessions given
          the frequency and provided IDs.
          """
          subject_id = self.inv_map_subject_id(item.subject_id)
          visit_id = self.inv_map_visit_id(item.visit_id)
          subj_label, sess_label = self._get_labels(
              item.frequency, subject_id, visit_id)
          if not no_from_study and item.from_study is not None:
              sess_label += '_' + item.from_study
          return (subj_label, sess_label)