/**
 * This function checks for the intersection of two lists using the 'not in' operator and 'identity comparison'.
 *
 * @param list1 A list of elements.
 * @param list2 Another list of elements.
 * @return A list of elements that are common to both input lists.
 */
fun intersectionCheck(list1: List<Any>, list2: List<Any>): List<Any> {

    val result = mutableListOf<Any>()
    for (element in list1) {
        if (element !in list2) {
            continue
        }
        if (element in result) {
            continue
        }
        if (element !== null) {
            result.add(element)
        }
    }
    return result
}
/**
 * This function checks for the intersection of two lists using the 'not in' operator and 'identity comparison'.
 *
 * @param list1 A list of elements.
 * @param list2 Another list of elements.
 * @return A list of elements that are common to both input lists.
 */
fun intersectionCheck(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * This function checks for the intersection of two lists using the 'not in' operator and 'identity comparison'.
 *
 * @param list1 A list of elements.
 * @param list2 Another list of elements.
 * @return A list of elements that are common to both input lists.
 */
fun intersectionCheck(list1: List<Any>, list2: List<Any>): List<Any> {

    val result = mutableListOf<Any>()
    for (element in list1) {
        if (element !in list2) {
            continue
        }
        if (element in result) {
            continue
        }
        if (element !== null) {
            result.add(element)
        }
    }
    return result
}