Sampling an image at user defined coordinates

How to sample an image at user defined coordinates like in tensorflow_graphics.image.transformer.sample?