what it is saying that for the function horizontal_behaivor
it is expecting an indent. because you used a # for the play run nothing is called. there is no code there and if it meets the condition then it wont know what to do. try putting this
if direction.x !=0:
pass
this will just skip the function and nothing will happen