Can someone give me an example (in a script) on how to use this function?

I honestly forgot, and have no idea how. I used to use this ages ago. Probably just lack of usage.

thanks