code: def sample_labels(self, n):
          
          if n >= len(self):
              return self.labels
          sample = random.sample(self.labels, n)
          return set(sample)
docs: Returns a set of n labels sampled from the labels of the tree
          :param n: Number of labels to sample
          :return: set of randomly sampled labels