```\nfunction getWellPriceFromTwaReserves(address well) internal view returns (uint256 price) {\n    AppStorage storage s = LibAppStorage.diamondStorage();\n    // s.twaReserve[well] should be set prior to this function being called.\n    // 'price' is in terms of reserve0:reserve1.\n    if (s.twaReserves[well].reserve0 == 0) {\n        price = 0;\n    } else {\n        price = s.twaReserves[well].reserve0.mul(1e18).div(s.twaReserves[well].reserve1);\n    }\n}\n```\n