def METHOD_NAME(self, image_array, rng, index=None, pixel=None):
    """
    Paint a single cosmic ray onto the input image array.
    Parameters
    ----------
    image_array: numpy.array
        Input image array onto which the CRs are painted.
    rng: galsim.BaseDeviate
        Random number generator.
    index: int [None] The list index of the CR to paint. If None,
        then a random CR will be selected.
    pixel: tuple(int, int) [None]
        Pixel coordinates of the starting pixel of the footprint
        used for painting the CR. If None, then a random pixel in
        the image_array will be selected.
    Returns
    -------
    numpy.array: The input image array with the CR added.
    """
    ud = galsim.UniformDeviate(rng)
    if index is None:
        index = int(ud()*len(self))
    cr = self[index]
    if pixel is None:
        pixel = (int(ud()*image_array.shape[1]),
                 int(ud()*image_array.shape[0]))
    for span in cr:
        for dx, value in enumerate(span.pixel_values):
            try:
                image_array[pixel[1] + span.y0 - cr[0].y0,
                            pixel[0] + span.x0 - cr[0].x0 + dx] += value
            except IndexError:
                pass
    return image_array