      "    max_h = 1 + max(left_max_h, right_max_h)\n",
      "    balanced = left_balanced and right_balanced and abs(max_h-min_h) <= 1\n",
      "    return (balanced, min_h, max_h)\n",
      "\n",
      "def check_balance(root):\n",
      "    if root is None:\n",
      "        raise Exception('No root node')\n",
      "    balanced, _, _ = _check_balance(root)\n",
 
</s> remove     "        return False\n",
 </s> add     "        raise Exception('No root node')\n", </s> remove     "    if not root:\n",
 </s> add     "    if root is None:\n",
    "\n",
      "    max_h = 1 + max(left_max_h, right_max_h)\n",
      "    balanced = left_balanced and right_balanced and abs(max_h-min_h) <= 1\n",
      "    return (balanced, min_h, max_h)\n",
      "\n",
    "\n",
      "def check_balance(root):\n",
      "    if root is None:\n",
      "        raise Exception('No root node')\n",
      "    balanced, _, _ = _check_balance(root)\n",
keep keep keep add keep keep keep keep
 Polish bst check balanced challenge and solution (#84)

Update constraints, tests, and code. 
graphs_trees/check_balance/check_balance_solution.ipynb