code: def add_instruction(self, specification):
          
          instruction = self.as_instruction(specification)
          self._type_to_instruction[instruction.type] = instruction
docs: Add an instruction specification
  
          :param specification: a specification with a key
            :data:`knittingpattern.Instruction.TYPE`
  
          .. seealso:: :meth:`as_instruction`