code: def get_single_by_flags(self, flags):
          
          regs = list(self.get_by_flags(flags))
          if len(regs) != 1:
              raise ValueError("Flags do not return unique resigter. {!r}", regs)
  
          return regs[0]
docs: Get the register info matching the flag. Raises ValueError if more than one are found.