Write a function to implement a Caesar Cipher integration or similar string manipulation task.
Implement caesar_cipher(text, shift). Return a new string where each English alphabetic character is shifted forward by shift positions, wrapping from z to a and preserving letter case. Leave spaces, digits, punctuation, and other nonalphabetic characters unchanged. Positive and negative shifts are valid.
Input: a string text and an integer shift.
Output: the transformed string.
Examples: caesar_cipher("Hello, World!", 3) returns "Khoor, Zruog!"; caesar_cipher("abc", -1) returns "zab".
Constraints: 0 <= len(text) <= 1000; -10^9 <= shift <= 10^9; input contains standard ASCII characters.
def caesar_cipher(text, shift):