<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def previous(self):
 """ fetch the chart identified by this chart's previous_id attribute if the previous_id is either null or not present for this chart return None returns the new chart instance on sucess"""
        
        try:
            if self.previous_id:
                return Chart(self.previous_id)
            else:
                log.debug('attempted to get previous chart, but none was found')
                return
        except AttributeError:
            #chart does not implement next pointer
            log.debug('attempted to get previous chart from a chart without a previous attribute')
            return None