<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def Title(self):
 """ Return the title if possible, else return the Sample type. Fall back on the instance's ID if there's no sample type or title. """

        title = ''
        if self.title:
            title = self.title
        else:
            sampletype = self.getSampleType()
            if sampletype:
                title = sampletype.Title()
        return safe_unicode(title).encode('utf-8')