def METHOD_NAME(api_desc_fpath, f, abi_mode):
    api = pyrprapi.load(api_desc_fpath)
    for name, c in api.constants.items():
        print(name)
        # if a constant is actually a variable to another constant reference that
        if "RPR_" + c.value in api.constants.keys():
            print('#define', name, pyrprapi.eval_constant(api.constants["RPR_" + c.value].value)
                  if abi_mode else '...', file=f)
        elif "RIF_" + c.value in api.constants.keys():
            print('#define', name, pyrprapi.eval_constant(api.constants["RIF_" + c.value].value)
                  if abi_mode else '...', file=f)
        else:
          print('#define', name, pyrprapi.eval_constant(c.value) if abi_mode else '...', file=f)
    for name, t in api.types.items():
        print(name, t.kind)
        # causes error while parsing 'rpr_stat', 'rpr_stats' in RadeonProRender_Baikal.h
        if name in ('rpr_stat', 'rpr_stats'):
            continue
        if 'struct' == t.kind:
            print('typedef struct', name, '{', file=f)
            for field in t.fields:
                print('    ' + field.type, field.name + ';', file=f)
            print('};', file=f)
        else:
            print('typedef ', t.type, name, ';', file=f)
    for name, t in api.functions.items():
        if 'rifContextExecuteCommandQueue' == name:
            print('rif_int rifContextExecuteCommandQueue(rif_context context, rif_command_queue command_queue, void *executeFinishedCallbackFunction(void* userdata), void* data, rif_performance_statistic* statistics);', file=f)
            continue
        print(name, [(arg.name, arg.type) for arg in t.args])
        print(t.restype, name, '(' + ', '.join(arg.type + ' ' + arg.name for arg in t.args) + ');', file=f)