code: def decode(stream, *args, **kwargs):
      
      encoding = kwargs.pop('encoding', DEFAULT_ENCODING)
      decoder = get_decoder(encoding, stream, *args, **kwargs)
  
      return decoder
docs: A generator function to decode a datastream.
  
      @param stream: AMF data to be decoded.
      @type stream: byte data.
      @kwarg encoding: AMF encoding type. One of L{ENCODING_TYPES}.
      @return: A generator that will decode each element in the stream.