<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def createInstance(self, codec=None):
 """ Creates an instance of the klass. @return: Instance of C{self.klass}. """

        if type(self.klass) is type:
            return self.klass.__new__(self.klass)

        return self.klass()