human
Find maximum with limited length in a list
assistant
Here is some code to find maximum with lookahead = 4 in a list `arr`

[max(abs(x) for x in arr[i:i + 4]) for i in range(0, len(arr), 4)]

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.