def handle(self, data, **kwargs):
        """Run serialization for the specified mapper_class.

        Supports both .serialize and .many().serialize Kim interfaces.

        :param data: Objects to be serialized.
        :returns: Serialized data according to mapper configuration
        """
        if self.many:
            return self.mapper.many(raw=self.raw, **self.mapper_kwargs).serialize(
                data, role=self.role
            )
        else:
            return self.mapper(obj=data, raw=self.raw, **self.mapper_kwargs).serialize(
                role=self.role
            )
Run serialization for the specified mapper_class.

        Supports both .serialize and .many().serialize Kim interfaces.

        :param data: Objects to be serialized.
        :returns: Serialized data according to mapper configuration