def prompt_layer_selection(self, node, layers):
valid = {<EOL>"<STR_LIT:default>": "<STR_LIT:default>",<EOL>"<STR_LIT>": "<STR_LIT:default>",<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>}<EOL>question = """<STR_LIT>""" % (node.name, len(layers))<EOL>available_layers = "<STR_LIT>"<EOL>for layer in layers:<EOL><INDENT>available_layers += "<STR_LIT>" % (layer.id, layer.name)<EOL>valid[str(layer.id)] = layer.id<EOL><DEDENT>prompt = """<STR_LIT>""" % available_layers<EOL>sys.stdout.write(question + prompt)<EOL>while True:<EOL><INDENT>if self.options.get('<STR_LIT>') is True:<EOL><INDENT>answer = '<STR_LIT:default>'<EOL>break<EOL><DEDENT>answer = raw_input().lower()<EOL>if answer == '<STR_LIT>':<EOL><INDENT>answer = "<STR_LIT:default>"<EOL><DEDENT>if answer in valid:<EOL><INDENT>answer = valid[answer]<EOL>break<EOL><DEDENT>else:<EOL><INDENT>sys.stdout.write("<STR_LIT>")<EOL><DEDENT><DEDENT>sys.stdout.write("<STR_LIT:\n>")<EOL>return answer<EOL>
Ask user what to do when an old node is contained in more than one layer.
        Possible answers are:
            * use default layer (default answer if pressing enter)
            * choose layer
            * discard node