<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def serialize(self, value, **kwargs):
 """ pre-serialize value """

        if self._serialize is not None:
            return self._serialize(value, **kwargs)
        else:
            return value