Parses the annotation return tuples. Ruturn a dictinary {code: info}.

def parse_return_annotation(callback):
    '''Parses the annotation return tuples. Ruturn a dictinary {code: info}.'''
    # This has been implemented as a function as the parsing need to be
    # accessible from a decorator used on the function's class method
    responses = {}
    for data in callback.__annotations__['return']:
        tmp = dict(zip(('code', 'message', 'responseModel'), data))
        rm = tmp.get('responseModel', None)  # "None" can be omitted!
        tmp['responseModel'] = rm.name if rm else 'void'
        responses[tmp['code']] = tmp
    return responses