'Receive a message with a custom deserialization function.
.. versionadded:: 17
Parameters
deserialize : callable
The deserialization function to use.
deserialize will be called with one argument: the list of frames
returned by recv_multipart() and can return any object.
flags : int, optional
Any valid send flag.
copy : bool, optional
Whether to recv bytes or Frame objects.'

def recv_serialized(self, deserialize, flags=0, copy=True):

    frames = self.recv_multipart(flags=flags, copy=copy)
    return self._deserialize(frames, deserialize)
