code: def single_case(self, i, case):
          
  
          # Pop a previous case if we have consecutive ones.
          if self.single_stack:
              self.single_stack.pop()
          self.single_stack.append(case)
          try:
              t = next(i)
              if self.use_format and t in _CURLY_BRACKETS:
                  self.handle_format(t, i)
              elif t == '\\':
                  try:
                      t = next(i)
                      self.reference(t, i)
                  except StopIteration:
                      self.result.append(t)
                      raise
              elif self.single_stack:
                  self.result.append(self.convert_case(t, self.get_single_stack()))
          except StopIteration:
              pass
docs: Uppercase or lowercase the next character.