code: def set_background(img, color=None, name=None):
      """Return a new image, with the background set to `color`.
  
      Parameters
      ----------
      img : Image
      color : color name or tuple, optional
          The background color. Can be specified either by name, hexcode, or as a
          tuple of ``(red, green, blue)`` values.
      """
      from datashader.composite import over
  
      if not isinstance(img, Image):
          raise TypeError(
              "Expected `Image`, got: `{0}`".format(type(img))
          )
      name = img.name if name is None else name
      if color is None:
          return img
      background = np.uint8(rgb(color) + (255,)).view("uint32")[0]
      data = over(img.data, background)
      return Image(data, coords=img.coords, dims=img.dims, name=name)
  
imports: from __future__ import annotations
  from collections.abc import Iterator
  from io import BytesIO
  import warnings
  import numpy
  import numba
  import toolz
  import xarray
  import dask.array
  from PIL.Image import fromarray
  from datashader.colors import rgb, Sets1to3
  from datashader.utils import nansum_missing, ngjit
label_desc: Use image node_id 10 for calling a global function with example usage: set_background(img, color, name) and returns: Image, img