input: from typing import Dict, Any
  
  def findMaxValue(nested_dict: Dict[str, Any]) -> int:
      """Find the maximum value within a nested dictionary.
  
      >>> findMaxValue({"key1": {"value1": 10, "value2": 20}, "key2": {"value3": 40}})
      40
      >>> findMaxValue({"a": {"b": 5}, "c": {"d": {"e": 45}, "f": 10}})
      45
      """
      max_val = float('-inf')
      for key, value in nested_dict.items():
          if isinstance(value, dict):
              max_val = max(findMaxValue(value), max_val)
          else:
              max_val = max(value, max_val)
      return max_val
output:     max_val = float('-inf')
      for key, value in nested_dict.items():
          if isinstance(value, dict):
              max_val = max(findMaxValue(value), max_val)
          else:
              max_val = max(value, max_val)
      return max_val