<s> def bfs ( graph , start ) : <EOL> """<STR_LIT>""" <EOL> visited , queue = set ( ) , [ start ] <EOL> while queue : <EOL> node = queue . pop ( <NUM_LIT:0> ) <EOL> if node not in visited : <EOL> visited . add ( node ) <EOL> queue . extend ( graph [ node ] - visited ) <EOL> return visited </s>
