You can create objects like this
System.CreateByName("<sprite's\object's name", layer_num, x pos, y pos)
after that you can set it's variables like this
SOL.<sprite's\object's name>.SetValue('<value's name>', <the value>)
SOL stands for selected objects list, it picks the last created object in this case.
So your python function should look like this:
def create_sprite(layer, x, y, var1, var2):
System.Create("Sprite", layer, x, y)
SOL.Sprite.SetValue('a', var1)
SOL.Sprite.SetValue('b', var2)
etc
and if you want to call it just insert this line under an event
create_sprite() - and fill the values of course.
You can set default values, so if you mostly use a specific layer, variables, etc, than you don't have to specify them over and over, just rewrite the original function like this
def create_sprite(layer = 1, x = 0, y = 0, var1 = 40, var2 = 20)
In this way you can spawn another instances by typing just create_sprite().