code: func Images(nodeStatusMaxImages int32,
  	imageListFunc func() ([]kubecontainer.Image, error), // typically Kubelet.imageManager.GetImageList
  ) Setter {
  	return func(node *v1.Node) error {
  		// Update image list of this node
  		var imagesOnNode []v1.ContainerImage
  		containerImages, err := imageListFunc()
  		if err != nil {
  			// TODO(mtaufen): consider removing this log line, since returned error will be logged
  			klog.Errorf("Error getting image list: %v", err)
  			node.Status.Images = imagesOnNode
  			return fmt.Errorf("error getting image list: %v", err)
  		}
  		// we expect imageListFunc to return a sorted list, so we just need to truncate
  		if int(nodeStatusMaxImages) > -1 &&
  			int(nodeStatusMaxImages) < len(containerImages) {
  			containerImages = containerImages[0:nodeStatusMaxImages]
  		}
  
  		for _, image := range containerImages {
  			names := append(image.RepoDigests, image.RepoTags...)
  			// Report up to MaxNamesPerImageInNodeStatus names per image.
  			if len(names) > MaxNamesPerImageInNodeStatus {
  				names = names[0:MaxNamesPerImageInNodeStatus]
  			}
  			imagesOnNode = append(imagesOnNode, v1.ContainerImage{
  				Names:     names,
  				SizeBytes: image.Size,
  			})
  		}
  
  		node.Status.Images = imagesOnNode
  		return nil
  	}
  }
docs: // Images returns a Setter that updates the images on the node.
  // imageListFunc is expected to return a list of images sorted in descending order by image size.
  // nodeStatusMaxImages is ignored if set to -1.