<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_single_by_flags(self, flags):
 """Get the register info matching the flag. Raises ValueError if more than one are found."""

        regs = list(self.get_by_flags(flags))
        if len(regs) != 1:
            raise ValueError("Flags do not return unique resigter. {!r}", regs)

        return regs[0]