code: def invert_shift(chars):
      
      result = ""
      for char in chars:
          if char in string.ascii_lowercase:
  #             log.critical("auto shift lowercase char %s to UPPERCASE", repr(char))
              char = char.upper()
          elif char in string.ascii_uppercase:
  #             log.critical("auto shift UPPERCASE char %s to lowercase", repr(char))
              char = char.lower()
          result += char
      return result
docs: >>> invert_shift("a")
      'A'
      >>> invert_shift("A")
      'a'
  
      >>> invert_shift("123 foo 456 BAR #!")
      '123 FOO 456 bar #!'