<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def draw(board, term, cells):
 """Draw a board to the terminal."""

    for (x, y), state in board.iteritems():
        with term.location(x, y):
            print cells[state],