<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def prune_to_subset(self, subset, inplace=False):
 """ Prunes the Tree to just the taxon set given in `subset` """

        if not subset.issubset(self.labels):
            print('"subset" is not a subset')
            return
        if not inplace:
            t = self.copy()
        else:
            t = self
        t._tree.retain_taxa_with_labels(subset)
        t._tree.encode_bipartitions()
        t._dirty = True
        return t