def contains_incorrect_symbols(test_expr, target_expr):
    """Test if the entered expression contains exactly the same symbols as the target.

       Sometimes expressions can be mathematically identical to one another, but
       contain different symbols. From a pure maths standpoint, this is fine; but
       in questions you may not want to allow undefined symbols. This function will
       return a dict containing entries for any extra/missing symbols.
        - 'test_expr' should be the untrusted sympy expression to check symbols from.
        - 'target_expr' should be the trusted sympy expression to match symbols to.
    """
    print("[[SYMBOL CHECK]]")
    if test_expr.free_symbols != target_expr.free_symbols:
        print("Symbol mismatch between test and target!")
        result = dict()
        missing = ",".join(map(str, list(target_expr.free_symbols.difference(test_expr.free_symbols))))
        extra = ",".join(map(str, list(test_expr.free_symbols.difference(target_expr.free_symbols))))
        missing = missing.replace("lamda", "lambda").replace("Lamda", "Lambda")
        extra = extra.replace("lamda", "lambda").replace("Lamda", "Lambda")
        if len(missing) > 0:
            print("Test Expression missing: {}".format(missing))
            result["missing"] = missing
        if len(extra) > 0:
            print("Test Expression has extra: {}".format(extra))
            result["extra"] = extra
        print("Not Equal: Enforcing strict symbol match for correctness!")
        return result
    else:
        return None