<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def format(self, method, data):
        ''' Calls format on list or detail '''
        if data is None:
            if method == 'GET':
                raise NotFound()
            return ''

        return self._meta.formatter.format(data)