<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def subsample(self, down_to=1, new_path=None):
 """Pick a number of sequences from the file pseudo-randomly."""

        # Auto path #
        if new_path is None: subsampled = self.__class__(new_temp_path())
        elif isinstance(new_path, FASTA): subsampled = new_path
        else:                subsampled = self.__class__(new_path)
        # Check size #
        if down_to > len(self):
            message = "Can't subsample %s down to %i. Only down to %i."
            print Color.ylw + message % (self, down_to, len(self)) + Color.end
            self.copy(new_path)
            return
        # Do it #
        subsampled.create()
        for seq in isubsample(self, down_to): subsampled.add_seq(seq)
        subsampled.close()
        # Did it work #
        assert len(subsampled) == down_to
        return subsampled