def SetSegBounds(ea, startea, endea, flags):
    return idaapi.set_segm_start(ea, startea, flags) & \
           idaapi.set_segm_end(ea, endea, flags)
Change segment boundaries
dataset/ETHPy150Open EiNSTeiN-/idapython/python/idc.py/SetSegBounds