def get(self, field, value=None):
self.value = value<EOL>val = self.input(field)<EOL>if field == '<STR_LIT:name>':<EOL><INDENT>while True:<EOL><INDENT>if val != '<STR_LIT>':<EOL><INDENT>break<EOL><DEDENT>print("<STR_LIT>")<EOL>val = self.input(field)<EOL><DEDENT><DEDENT>elif field == '<STR_LIT>':<EOL><INDENT>if val == '<STR_LIT>':  <EOL><INDENT>return None<EOL><DEDENT>while True:<EOL><INDENT>if val in Get.PRIORITIES.values():<EOL><INDENT>break<EOL><DEDENT>c, val = val, Get.PRIORITIES.get(val)<EOL>if val:<EOL><INDENT>break<EOL><DEDENT>print("<STR_LIT>".format(c))<EOL>val = self.input(field)<EOL><DEDENT>val = int(val)<EOL><DEDENT>return val<EOL>
Gets user input for given field and checks if it is valid.

        If input is invalid, it will ask the user to enter it again.
        Defaults values to empty or :value:.

        It does not check validity of parent index. It can only be tested
        further down the road, so for now accept anything.

        :field: Field name.
        :value: Default value to use for field.
        :returns: User input.