def _resolve_serializer(self, serializer):
        """
        Resolve the given serializer.

        :param serializer: The serializer to resolve
        :type serializer: str or Serializer

        :rtype: Serializer
        """
        if isinstance(serializer, Serializer):
            return serializer

        if serializer in self._serializers:
            return self._serializers[serializer]

        raise RuntimeError('Unsupported serializer')