<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_abstract(self, xml_dict):
 """ If record has an abstract, extract it from PubMed's XML data """

        if self.record.get('HasAbstract') == 1 and xml_dict:
            self.abstract = self.parse_abstract(xml_dict)
        else:
            self.abstract = ''