def call_response_cb_if_done(d: ApiDefinition, m: Callable):
    if d.has_done_flag:
        return f'''
        if (done):
            {call_response_cb(d, m)}'''
    elif (not GeneratorUtils.response_is_list(d)):
        return f'''
        {call_response_cb(d, m)}'''
    else:
        return ''
def call_response_cb_if_done(d: ApiDefinition, m: Callable):
    if d.has_done_flag:
        return f'
        if (done):
            {call_response_cb(d, m)}'
    elif (not GeneratorUtils.response_is_list(d)):
        return f'
        {call_response_cb(d, m)}'
    else:
        return 