def process_array(image_array, expand=True):
    """ Process a 3-dimensional array into a scaled, 4 dimensional batch of size 1. """
    
    image_batch = image_array / 255.0
    if expand:
        image_batch = np.expand_dims(image_batch, axis=0)
    return image_batch
Process a 3-dimensional array into a scaled, 4 dimensional batch of size 1.
ISR/utils/image_processing.py