input: Write a python function to calculate the frequency of each character in a given text.
  assert char_frequency("hello") == {'h': 1, 'e': 1, 'l': 2, 'o': 1}
  assert char_frequency("test") == {'t': 2, 'e': 1, 's': 1}
  assert char_frequency("aabbcc") == {'a': 2, 'b': 2, 'c': 2}
output: def char_frequency(text):
      frequency = {}
      for char in text:
          if char in frequency:
              frequency[char] += 1
          else:
              frequency[char] = 1
      return frequency