def generate_task_families(task_class, n):
 ret = {}
 for i in range(n):
  class_name = '{}_{}'.format(task_class.task_family, i)
  ret[class_name] = type(class_name, (task_class,), {})
 return ret

def generate_task_families ( task_class , n ) : ret = { } for i in range ( n ) : class_name = '{}_{}' . format ( task_class . task_family , i ) ret [ class_name ] = type ( class_name , ( task_class , ) , { } ) return ret
generate n copies of a task with different task_family names .