I have static function which is limited to some context eg only for docs. There are 2 alternative ways to define it as top-level function or function in an object.
object Clazz will be compiled as singleton, top-level function will be compiled as static in JVM.
if there are no reasons for your method to be in instance, static(top-level, companion object) way would be a little bit high-performance.(ref: https://stackoverflow.com/a/11993118/5354658)