How on python to change the name of the launched instruction using the input parameter of the function? How to do this without using if and else? The idea is to make a statement something like .format() for strings. See an example of an idea below.
def run_module(file, module_name):
.
.
.
res = object.module_name(file, param2, param3, ...)
.
.
.
return
object - an entity from the library, there is no possibility to change. I would be grateful for any constructive advice.