input: def evaluate_expression(expr: str) -> float:
      """
      Evaluate a given numerical expression in string format and return the result.
  
      >>> evaluate_expression("1 + 2 * 3")
      7.0
      >>> evaluate_expression("(4 + 5) / 2")
      4.5
      >>> evaluate_expression("7 - 3")
      4.0
      """
      return eval(expr)
output:     try:
          result = eval(expr)
          return float(result)
      except Exception as e:
          raise ValueError(f"Invalid expression: {expr}")