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

def parse(self, method, endpoint, body):
        ''' calls parse on list or detail '''
        if isinstance(body, dict):  # request body was already parsed
            return body
        if endpoint == 'list':
            return self.parse_list(body)

        return self.parse_detail(body)