input: Write a function to encrypt a message using a Caesar cipher. The function should take a message and a shift value as input and return the encrypted message. The Caesar cipher shifts each character in the message by the specified number of positions in the ASCII table. If the shifted character goes past '~' (which is ASCII 126), it should wrap around to the beginning of the printable ASCII characters.
  
  def caesar_encrypt(message, shift):
      encrypted_message = ""
      for c in message:
          encrypted_c = ord(c) + shift
          if encrypted_c > 126:
              encrypted_c -= 94
          encrypted_message += chr(encrypted_c)
      return encrypted_message
  
  assert caesar_encrypt("Hello, World!", 3) == "Khoor/#Zruog$"
  assert caesar_encrypt("Python", 5) == "U{ytvs"
  assert caesar_encrypt("Caesar", 7) == "Jhlzhy"
  assert caesar_encrypt("~!", 1) == "!,"
  assert caesar_encrypt("", 2) == ""
output: def caesar_encrypt(message, shift):
      encrypted_message = ""
      for c in message:
          encrypted_c = ord(c) + shift
          if encrypted_c > 126:
              encrypted_c -= 94
          encrypted_message += chr(encrypted_c)
      return encrypted_message