def serialize(self,
                  node: SchemaNode,
                  appstruct: Union[PotentialDatetimeType,
                                   ColanderNullType]) \
            -> Union[str, ColanderNullType]:
        """
        Serializes Python object to string representation.
        """
        if not appstruct:
            return colander.null
        try:
            appstruct = coerce_to_pendulum(appstruct,
                                           assume_local=self.use_local_tz)
        except (ValueError, ParserError) as e:
            raise Invalid(
                node,
                "{!r} is not a pendulum.DateTime object; error was "
                "{!r}".format(appstruct, e))
        return appstruct.isoformat()