def move(position, instruction):
  """
  Take a position and offset it based on instuction, or raise an error on invalid instruction.

  Keyword arguments:
  position    --- current position as a tuple (x,y)
  Instruction --- single-character instruction to move in ["^", "v", ">", "<"]
  """
  if instruction == "^":
    return (position[0], position[1] + 1)
  elif instruction == "v":
    return (position[0], position[1] - 1)
  elif instruction == ">":
    return (position[0] + 1, position[1])
  elif instruction == "<":
    return (position[0] - 1, position[1])
  else:
    raise ValueError("Instruction '{}' not recognized".format(instruction))