code: def test_issue_21870():
      a0 = ImmutableDenseNDimArray(0)
      assert a0.rank() == 0
      a1 = ImmutableDenseNDimArray(a0)
      assert a1.rank() == 0
  
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 19 for calling a global function with example usage: test_issue_21870() without return types