input: Write a python function to encode a message using Caesar Cipher with a given key.
  assert caesar_cipher("This is a secret message.", 0) == "This is a secret message."
  assert caesar_cipher("abcdef", 1) == "zabcde"
  assert caesar_cipher("XYZ", 3) == "TUV"
  assert caesar_cipher("Hello, World!", 5) == "Czggj, Rjmgy!"
output: def caesar_cipher(message, key):
      def shift_char(c, key):
          if 'a' <= c <= 'z':
              return chr((ord(c) - ord('a') - key) % 26 + ord('a'))
          elif 'A' <= c <= 'Z':
              return chr((ord(c) - ord('A') - key) % 26 + ord('A'))
          else:
              return c
  
      return ''.join(shift_char(c, key) for c in message)