(self, serialized: dict, *, native_id=None, **extra)
return self.message_class.from_dict(
            metadata=metadata, kwargs=kwargs, native_id=native_id, **extra
        )
Takes a dictionary of serialised fields and returns a Message object

        See the module-level docs (above) for further details
Takes a dictionary of serialised fields and returns a Message object
Takes a dictionary of serialised fields and returns a Message object
def __call__(self, serialized: dict, *, native_id=None, **extra):
        """Takes a dictionary of serialised fields and returns a Message object

        See the module-level docs (above) for further details
        """
        metadata = {}
        kwargs = {}

        for k, v in serialized.items():
            k = decode_bytes(k)
            v = decode_bytes(v)

            if not k:
                continue

            # kwarg fields start with a ':', everything else is metadata
            if k[0] == ":":
                # kwarg values need decoding
                kwargs[k[1:]] = self.decoder(v)
            else:
                # metadata args are implicitly strings, so we don't need to decode them
                metadata[k] = v

        sanity_check_metadata(self.message_class, metadata)

        if "native_id" in metadata:
            native_id = metadata.pop("native_id")

        return self.message_class.from_dict(
            metadata=metadata, kwargs=kwargs, native_id=native_id, **extra
        )
def __call__ ( self , serialized : dict , * , native_id = None , * * extra ) : metadata = { } kwargs = { } for k , v in serialized . items ( ) : k = decode_bytes ( k ) v = decode_bytes ( v ) if not k : continue # kwarg fields start with a ':', everything else is metadata if k [ 0 ] == ":" : # kwarg values need decoding kwargs [ k [ 1 : ] ] = self . decoder ( v ) else : # metadata args are implicitly strings, so we don't need to decode them metadata [ k ] = v sanity_check_metadata ( self . message_class , metadata ) if "native_id" in metadata : native_id = metadata . pop ( "native_id" ) return self . message_class . from_dict ( metadata = metadata , kwargs = kwargs , native_id = native_id , * * extra )