input: Write a function to find the maximum value within a nested dictionary. Provide the function definition and ensure it works for dictionaries with nested structures.
  
  def findMaxValue(dictionary):
      max_val = float('-inf')
      for key, value in dictionary.items():
          if isinstance(value, dict):
              max_val = max(findMaxValue(value), max_val)
          else:
              max_val = max(value, max_val)
      return max_val
  
  assert findMaxValue({})==float('-inf')
  assert findMaxValue({"key1": 5})==5
  assert findMaxValue({"key1": {"value1": 10, "value2": 20}, "key2": {"value3": 40}})==40
  assert findMaxValue({"key1": {"value1": 100}, "key2": {"value3": 40, "value4": {"value5": 200}}})==200
output: def findMaxValue(dictionary):
      max_val = float('-inf')
      for key, value in dictionary.items():
          if isinstance(value, dict):
              max_val = max(findMaxValue(value), max_val)
          else:
              max_val = max(value, max_val)
      return max_val