code: def make_rectangles_dataset(num, w, h):
      d, Y = np.zeros((num, h, w)), np.zeros((num, 1))
      for i, img in enumerate(d):
          for j in range(1000):  # Finite number of tries
              x0, y0, x1, y1 = make_random_rectangle(img)
              rw, rh = y1 - y0, x1 - x0
              if rw == rh:
                  img[:, :] = 0
                  continue
              Y[i, 0] = rw > rh
              break
      return (
          d.reshape(num, w * h).astype(gpflow.config.default_float()),
          Y.astype(gpflow.config.default_float()),
      )
  
file_path: GPflow/notebooks/advanced/convolutional.pct.py
imports: import time
  import matplotlib.pyplot
  import numpy
  import tensorflow
  import tensorflow_probability
  import gpflow
  from gpflow import set_trainable
  from gpflow.ci_utils import is_continuous_integration
label_desc: Use image node_id 4 for calling a global function with example usage: make_rectangles_dataset(num, w, h) and returns: d,  Y