def SetFchunkOwner(tailea, funcea):
    tail = idaapi.get_func(tailea)

    if not tail:
        return 0
    else:
        return idaapi.set_tail_owner(tail, funcea)
Change the function chunk owner
dataset/ETHPy150Open EiNSTeiN-/idapython/python/idc.py/SetFchunkOwner