def create_generate(kind, project, resource, offset):
 generate = eval(('Generate' + kind.title()))
 return generate(project, resource, offset)

def create_generate ( kind , project , resource , offset ) : generate = eval ( ( 'Generate' + kind . title ( ) ) ) return generate ( project , resource , offset )
a factory for creating generate objects kind can be variable .