code: def convert_case(self, value, case):
          
  
          if self.is_bytes:
              cased = []
              for c in value:
                  if c in _ASCII_LETTERS:
                      cased.append(c.lower() if case == _LOWER else c.upper())
                  else:
                      cased.append(c)
              return "".join(cased)
          else:
              return value.lower() if case == _LOWER else value.upper()
docs: Convert case.