def _get_type(self, values):
if TYPE not in values:<EOL><INDENT>self._error("<STR_LIT>"<EOL>"<STR_LIT>".format(KNITTING_PATTERN_TYPE))<EOL><DEDENT>type_ = values[TYPE]<EOL>if type_ != KNITTING_PATTERN_TYPE:<EOL><INDENT>self._error("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>".format(type_, KNITTING_PATTERN_TYPE))<EOL><DEDENT>return type_<EOL>
:return: the type of a knitting pattern set.