<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __set_premature_stop_codon_status(self, hgvs_string):
 """Set whether there is a premature stop codon."""

        if re.search('.+\*(\d+)?$', hgvs_string):
            self.is_premature_stop_codon = True
            self.is_non_silent = True

            # check if it is also a nonsense mutation
            if hgvs_string.endswith('*'):
                self.is_nonsense_mutation = True
            else:
                self.is_nonsense_mutation = False
        else:
            self.is_premature_stop_codon = False
            self.is_nonsense_mutation = False