code: def test_3d(self):
      data = gen_data(3, False)
      a = array_like(data, "a", ndim=3)
      assert a.shape == (5, 6, 7)
      assert a.ndim == 3
      assert type(a) is np.ndarray
  
      a = array_like(data, "a", ndim=3, shape=(5, None, 7))
      assert a.shape == (5, 6, 7)
      a = array_like(data, "a", ndim=3, shape=(None, None, 7))
      assert a.shape == (5, 6, 7)
      a = array_like(data, "a", ndim=5)
      assert a.shape == (5, 6, 7, 1, 1)
      with pytest.raises(
          ValueError, match="a is required to have shape"
      ):
          array_like(data, "a", ndim=3, shape=(10,))
      with pytest.raises(
          ValueError, match="a is required to have shape"
      ):
          array_like(data, "a", ndim=3, shape=(None, None, 5))
      match = "a is required to have ndim 2 but has ndim 3"
      with pytest.raises(ValueError, match=match):
          array_like(data, "a", ndim=2)
      match = "a must have ndim <= 1"
      with pytest.raises(ValueError, match=match):
          array_like(data, "a", maxdim=1)
      match = "a must have ndim <= 2"
      with pytest.raises(ValueError, match=match):
          array_like(data, "a", maxdim=2)
  
imports: from collections import OrderedDict
  import numpy
  import pandas
  import pytest
  from statsmodels.tools.validation import array_like, PandasWrapper, bool_like, dict_like, float_like, int_like, string_like
  from statsmodels.tools.validation.validation import _right_squeeze
label_desc: Use image node_id 3 for calling the TestArrayLike obj's underlying member method code with example usage: obj.test_3d() without return types