<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def factory(self, classname, *args, **kwargs):
 """ Creates an instance of class looking for it in each module registered. You can add needed params to instance the class. :param classname: Class name you want to create an instance. :type classname: str :return: An instance of classname :rtype: object """


        klass = self.load_class(classname)

        return self.get_factory_by_class(klass)(*args, **kwargs)