code: def create_generic_image(filename, shape=(200, 300), gradient=True):
      """Create a generic image"""
      from PIL import Image
      import numpy as np
  
      assert len(shape) == 2
  
      arr = np.zeros((shape[0], shape[1], 3))
      if gradient:
          # gradient from gray to white
          arr += np.linspace(128, 255, shape[1])[:, None]
      im = Image.fromarray(arr.astype("uint8"))
      im.save(filename)
  
file_path: altair/sphinxext/utils.py
imports: import ast
  import hashlib
  import itertools
  import json
  import re
label_desc: Use image node_id 2 for calling a global function with example usage: create_generic_image(filename, shape, gradient) without return types