def render():
...
# midfield line (as net) - composed from couple of small rectangles
for y in range(NET_LENGTH // 2, HEIGHT, NET_LENGTH * 2):
draw_rectangle(
WIDTH // 2 - 1,
y,
WIDTH // 2 + 1,
y + NET_LENGTH)