code: def test_composite(corner):
      background_shape = (10, 10, 1)
      foreground_shape = (2, 2, 1)
      black = np.zeros(background_shape)
      white = np.ones(foreground_shape)
  
      comp = composite(
          black,
          white,
          foreground_position=corner,
          foreground_width_ratio=0.2,
      )
  
      wh = comp.shape[-3:-1]
      xy = [min(d * c, d - 1) for d, c in zip(wh, corner)]
      print(wh, corner, xy)
      assert comp[xy[0], xy[1], 0] > 0.99  # because interpolation!
      assert comp[5, 5] == 0
  
file_path: lucid/tests/misc/test_ndimage_utils.py
imports: import pytest
  import numpy
  from lucid.misc.io import load, save
  from lucid.misc.ndimage_utils import resize, composite
label_desc: Use image node_id 4 for calling a global function with example usage: test_composite(corner) without return types