def SetFchunkAttr(ea, attr, value):
    if attr in [ FUNCATTR_START, FUNCATTR_END, FUNCATTR_OWNER ]:
        chunk = idaapi.get_fchunk(ea)
        if chunk:
            _IDC_SetAttr(chunk, _FUNCATTRMAP, attr, value)
            return idaapi.update_func(chunk)
    return 0
Set a function chunk attribute
dataset/ETHPy150Open EiNSTeiN-/idapython/python/idc.py/SetFchunkAttr