Next Insurance uses lightweight text transformations in internal policy-processing tools. Implement a Caesar cipher encoder that shifts every English alphabetic character by a specified amount while preserving the original letter case.
Implement encrypt_message(text, shift):
text is a string containing ASCII letters, digits, spaces, punctuation, and possibly other characters.shift is an integer and may be positive, zero, or negative.A-Z and lowercase letters within a-z, wrapping around at the end of each alphabet.The shift may be larger than 26, so reduce it modulo 26. The input string must not be modified in place.
def encrypt_message(text, shift):