code: def test_equality():
      first_list = [1, 2, 3, 4]
      second_list = [1, 2, 3, 4]
      third_list = [4, 3, 2, 1]
      assert first_list == second_list
      assert first_list != third_list
  
      first_ndim_array = ImmutableDenseNDimArray(first_list, (2, 2))
      second_ndim_array = ImmutableDenseNDimArray(second_list, (2, 2))
      fourth_ndim_array = ImmutableDenseNDimArray(first_list, (2, 2))
  
      assert first_ndim_array == second_ndim_array
  
      def assignment_attempt(a):
          a[0, 0] = 0
  
      raises(TypeError, lambda: assignment_attempt(second_ndim_array))
      assert first_ndim_array == second_ndim_array
      assert first_ndim_array == fourth_ndim_array
  
imports: from copy import copy
  from sympy.tensor.array.dense_ndim_array import ImmutableDenseNDimArray
  from sympy.core.containers import Dict
  from sympy.core.function import diff
  from sympy.core.numbers import Rational
  from sympy.core.singleton import S
  from sympy.core.symbol import Symbol, symbols
  from sympy.matrices import SparseMatrix
  from sympy.tensor.indexed import Indexed, IndexedBase
  from sympy.matrices import Matrix
  from sympy.tensor.array.sparse_ndim_array import ImmutableSparseNDimArray
  from sympy.testing.pytest import raises
label_desc: Use image node_id 9 for calling a global function with example usage: test_equality() without return types