def reverse_direction(heading: int) -> int:
if heading >= <NUM_LIT>:<EOL><INDENT>return int(heading - <NUM_LIT>)<EOL><DEDENT>return int(heading + <NUM_LIT>)<EOL>
Inverts a direction in degrees

Args:
    heading: original direction

Returns: direction plus or minus 180°