def RemoveFchunk(funcea, tailea):
    func = idaapi.get_func(funcea)

    if not func:
        return 0
    else:
        return idaapi.remove_func_tail(func, tailea)
Remove a function chunk from the function
dataset/ETHPy150Open EiNSTeiN-/idapython/python/idc.py/RemoveFchunk