input: def findMaxValue(input_dict: dict) -> int:
      """Given a nested dictionary in Python, find the maximum value within it.
      >>> findMaxValue({
      ... "key1": {
      ... "value1": 10,
      ... "value2": 20
      ... },
      ... "key2": {
      ... "value3": 40
      ... }
      ... })
      40
      """
      max_val = None
      for key, value in input_dict.items():
          if isinstance(value, dict):
              max_val = max(findMaxValue(value), max_val)
          else:
              max_val = max(value, max_val)
      return max_val
output:     if max_val is None:
          max_val = float('-inf')
      return max_val