code: def assert_shape_equals(array, shape):
      """Asserts that an array has the given shape."""
      assert (
          array.shape == shape
      ), "Invalid shape {}; expected {}.".format(array.shape, shape)
  
file_path: trax/trax/shapes.py
imports: import numpy
  import tensorflow
label_desc: Use image node_id 3 for calling a global function with example usage: assert_shape_equals(array, shape) without return types