/**
 * This function takes two parameters, incomeStatement and balanceSheet,
 * and returns the prepared financial statements by applying the AND Operator.
 *
 * @param incomeStatement Dictionary containing revenue and expenses information.
 * @param balanceSheet Dictionary containing assets and liabilities information.
 * @return Dictionary containing the prepared financial statements.
 */
fun prepareFinancialStatements(incomeStatement: Map<String, Int>, balanceSheet: Map<String, Map<String, Int>>): Map<String, Int> {

    // Calculate net income by subtracting expenses from revenue
    val netIncome = incomeStatement["revenue"]!! - incomeStatement["expenses"]!!
    
    // Calculate total assets by summing up all the assets
    val totalAssets = balanceSheet["assets"]!!.values.sum()
    
    // Calculate total liabilities by summing up all the liabilities
    val totalLiabilities = balanceSheet["liabilities"]!!.values.sum()
    
    // Prepare the financial statements by applying the AND Operator
    return mapOf(
        "net_income" to netIncome,
        "total_assets" to totalAssets,
        "total_liabilities" to totalLiabilities
    )
}
/**
 * This function takes two parameters, incomeStatement and balanceSheet,
 * and returns the prepared financial statements by applying the AND Operator.
 *
 * @param incomeStatement Dictionary containing revenue and expenses information.
 * @param balanceSheet Dictionary containing assets and liabilities information.
 * @return Dictionary containing the prepared financial statements.
 */
fun prepareFinancialStatements(incomeStatement: Map<String, Int>, balanceSheet: Map<String, Map<String, Int>>): Map<String, Int> {
/**
 * This function takes two parameters, incomeStatement and balanceSheet,
 * and returns the prepared financial statements by applying the AND Operator.
 *
 * @param incomeStatement Dictionary containing revenue and expenses information.
 * @param balanceSheet Dictionary containing assets and liabilities information.
 * @return Dictionary containing the prepared financial statements.
 */
fun prepareFinancialStatements(incomeStatement: Map<String, Int>, balanceSheet: Map<String, Map<String, Int>>): Map<String, Int> {

    // Calculate net income by subtracting expenses from revenue
    val netIncome = incomeStatement["revenue"]!! - incomeStatement["expenses"]!!
    
    // Calculate total assets by summing up all the assets
    val totalAssets = balanceSheet["assets"]!!.values.sum()
    
    // Calculate total liabilities by summing up all the liabilities
    val totalLiabilities = balanceSheet["liabilities"]!!.values.sum()
    
    // Prepare the financial statements by applying the AND Operator
    return mapOf(
        "net_income" to netIncome,
        "total_assets" to totalAssets,
        "total_liabilities" to totalLiabilities
    )
}