def pop(self, model):
tags = self._pop(model)<EOL>if tags:<EOL><INDENT>for tag in tags:<EOL><INDENT>value = self.deserialize(tag)<EOL>try:<EOL><INDENT>self.validate(value)<EOL>return value<EOL><DEDENT>except TagValidationError:<EOL><INDENT>continue<EOL><DEDENT><DEDENT><DEDENT>
Pop all matching tags off the port, return a valid one.