```\nfunction _estimateWithdrawalLp(\n    uint256 reserve0,\n    uint256 reserve1,\n    uint256 _totalSupply,\n    uint256 amount0,\n    uint256 amount1\n) private pure returns (uint256 shareAmount) {\n    shareAmount =\n        ((amount0 * _totalSupply) / reserve0 + (amount1 * _totalSupply) / reserve1) /\n        2;\n}\n```\n