# Python 3.x
def function(x): return x if x >= 3 else x + 4
# Тест
Ox=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
for x in Ox: print(f"function({x})={function(x)}")
# Тест с зависимостями
import matplotlib.pyplot as plt
plt.plot(Ox, [function(x) for x in Ox])
plt.show()