def add_new_pattern(self, id_, name=None):
if name is None:<EOL><INDENT>name = id_<EOL><DEDENT>pattern = self._parser.new_pattern(id_, name)<EOL>self._patterns.append(pattern)<EOL>return pattern<EOL>
Add a new, empty knitting pattern to the set.

        :param id_: the id of the pattern
        :param name: the name of the pattern to add or if :obj:`None`, the
          :paramref:`id_` is used
        :return: a new, empty knitting pattern
        :rtype: knittingpattern.KnittingPattern.KnittingPattern