code: def generate_checkerboard(
      width: int, height: int, square_size: int
  ) -> np.ndarray:
      # Create an empty RGB image
      image = np.zeros((height, width, 3), dtype=np.uint8)
  
      # Calculate the number of squares in each dimension
      num_squares_x = width // square_size
      num_squares_y = height // square_size
  
      # Generate a random color for each square
      colors = np.random.randint(
          0, 256, size=(num_squares_y, num_squares_x, 3), dtype=np.uint8
      )
  
      # Iterate over each square
      for i in range(num_squares_y):
          for j in range(num_squares_x):
              # Calculate the position of the current square
              x = j * square_size
              y = i * square_size
  
              # Get the color for the current square
              color = colors[i, j]
  
              # Fill the square with the corresponding color
              image[y : y + square_size, x : x + square_size, :] = color
  
      return image
  
file_path: onnx/onnx/backend/test/case/node/image_decoder.py
imports: from __future__ import annotations
  import io
  import numpy
  import onnx
  from onnx.backend.test.case.base import Base
  from onnx.backend.test.case.node import _image_decoder_data, expect
label_desc: Use image node_id 1 for calling a global function with example usage: generate_checkerboard(width, height, square_size) and returns: image