function getExactlyOneShape(shapes) {
	  if (Array.isArray(shapes) && Array.isArray(shapes[0])) {
	    if (shapes.length === 1) {
	      shapes = shapes;
	      return shapes[0];
	    } else {
	      throw new ValueError("Expected exactly 1 Shape; got " + shapes.length);
	    }
	  } else {
	    return shapes;
	  }
	}
Helper function to obtain exactly on instance of Shape.

@param shapes Input single `Shape` or Array of `Shape`s.
@returns If input is a single `Shape`, return it unchanged. If the input is
  an `Array` containing exactly one instance of `Shape`, return the instance.
  Otherwise, throw a `ValueError`.
@throws ValueError: If input is an `Array` of `Shape`s, and its length is not
  1.