Write code to find unique characters and their occurrences in a string.
Implement count_character_occurrences(s) to return a dictionary mapping every distinct character in s to its frequency. Treat uppercase and lowercase characters as different, preserve spaces and punctuation, and preserve the order in which characters first appear. Return an empty dictionary for an empty string.
s.def count_character_occurrences(s):