/**
 * Returns specific information about a lawyer from a nested tuple.
 *
 * @param lawyerInfo A nested tuple containing lawyer information.
 * @param index The index to access the desired lawyer information.
 * @return The specific information about the lawyer.
 */
fun getLawyerTupleInfo(lawyerInfo: Any, index: Int): String {

    // Check if the given lawyerInfo is a valid nested tuple
    if (lawyerInfo !is List<*>) {
        return "Invalid input. Please provide a nested tuple."
    }

    // Check if the given index is within the range of the nested tuple
    if (index !in 0 until lawyerInfo.size) {
        return "Invalid index. Please provide a valid index within the range of the nested tuple."
    }

    // Access the desired lawyer information using the provided index
    val lawyer = lawyerInfo[index]

    // Check if the lawyer contains the expected information
    if (lawyer !is List<*> || lawyer.size < 3) {
        return "Invalid lawyer information. Please provide a valid nested tuple with at least 3 elements."
    }

    // Access specific information about the lawyer
    val lawyerName = lawyer[0].toString()

    return lawyerName
}
/**
 * Returns specific information about a lawyer from a nested tuple.
 *
 * @param lawyerInfo A nested tuple containing lawyer information.
 * @param index The index to access the desired lawyer information.
 * @return The specific information about the lawyer.
 */
fun getLawyerTupleInfo(lawyerInfo: Any, index: Int): String {
/**
 * Returns specific information about a lawyer from a nested tuple.
 *
 * @param lawyerInfo A nested tuple containing lawyer information.
 * @param index The index to access the desired lawyer information.
 * @return The specific information about the lawyer.
 */
fun getLawyerTupleInfo(lawyerInfo: Any, index: Int): String {

    // Check if the given lawyerInfo is a valid nested tuple
    if (lawyerInfo !is List<*>) {
        return "Invalid input. Please provide a nested tuple."
    }

    // Check if the given index is within the range of the nested tuple
    if (index !in 0 until lawyerInfo.size) {
        return "Invalid index. Please provide a valid index within the range of the nested tuple."
    }

    // Access the desired lawyer information using the provided index
    val lawyer = lawyerInfo[index]

    // Check if the lawyer contains the expected information
    if (lawyer !is List<*> || lawyer.size < 3) {
        return "Invalid lawyer information. Please provide a valid nested tuple with at least 3 elements."
    }

    // Access specific information about the lawyer
    val lawyerName = lawyer[0].toString()

    return lawyerName
}