code: def test_autocrop_array_shapes(self):
      from lasagne.layers.merge import autocrop_array_shapes
  
      crop0 = None
      crop1 = [None, "lower", "center", "upper"]
      # Too few crop modes; should get padded with None
      crop2 = ["lower", "upper"]
      # Invalid crop modes
      crop_bad = ["lower", "upper", "bad", "worse"]
  
      assert autocrop_array_shapes(
          [(1, 2, 3, 4), (5, 6, 7, 8), (5, 4, 3, 2)], crop0
      ) == [(1, 2, 3, 4), (5, 6, 7, 8), (5, 4, 3, 2)]
      assert autocrop_array_shapes(
          [(1, 2, 3, 4), (5, 6, 7, 8), (5, 4, 3, 2)], crop1
      ) == [(1, 2, 3, 2), (5, 2, 3, 2), (5, 2, 3, 2)]
      assert autocrop_array_shapes(
          [(1, 2, 3, 4), (5, 6, 7, 8), (5, 4, 3, 2)], crop2
      ) == [(1, 2, 3, 4), (1, 2, 7, 8), (1, 2, 3, 2)]
      assert autocrop_array_shapes(
          [(None, 2, 3, 4), (5, 6, 7, 8), (5, 4, 3, 2)], crop2
      ) == [(None, 2, 3, 4), (None, 2, 7, 8), (None, 2, 3, 2)]
  
      with pytest.raises(ValueError):
          autocrop_array_shapes(
              [(1, 2, 3, 4), (5, 6, 7, 8), (5, 4, 3, 2)], crop_bad
          )
  
      # Inconsistent dimensionality
      with pytest.raises(ValueError):
          autocrop_array_shapes(
              [(1, 2, 3, 4), (5, 6, 7), (5, 4, 3, 2, 10)], crop1
          )
  
imports: from mock import Mock
  import numpy
  import pytest
  import theano
label_desc: Use image node_id 1 for calling the TestAutocrop obj's underlying member method code with example usage: obj.test_autocrop_array_shapes() without return types