Transforms the original type I to the output type O. This method should be implemented to define how the transformation from I to O is done.