
import msgpack
from message_coder import MessageCoderBase

# set of functions to encode/decode data tokens to/from a json description
class MessageCoder(MessageCoderBase):

    def encode(self, data):
        return msgpack.packb(data)

    def decode(self, data):
        data = msgpack.unpackb(data)
        return data


import umsgpack
from message_coder import MessageCoderBase

umsgpack.compatibility = True

# set of functions to encode/decode data tokens to/from a json description
class MessageCoder(MessageCoderBase):

    def encode(self, data):
        return umsgpack.packb(data)

    def decode(self, data):
        data = umsgpack.unpackb(data)
        return data

Use umsgpack package for msgpack coder
coder/msgpack: Use umsgpack package for msgpack coder

  
- import msgpack
+ import umsgpack
  from message_coder import MessageCoderBase
+ 
+ umsgpack.compatibility = True
  
  # set of functions to encode/decode data tokens to/from a json description
  class MessageCoder(MessageCoderBase):
  
      def encode(self, data):
-         return msgpack.packb(data)
+         return umsgpack.packb(data)
  
      def decode(self, data):
-         data = msgpack.unpackb(data)
+         data = umsgpack.unpackb(data)
          return data
  
Use umsgpack package for msgpack coder
## Code Before:

import msgpack
from message_coder import MessageCoderBase

# set of functions to encode/decode data tokens to/from a json description
class MessageCoder(MessageCoderBase):

    def encode(self, data):
        return msgpack.packb(data)

    def decode(self, data):
        data = msgpack.unpackb(data)
        return data

## Instruction:
Use umsgpack package for msgpack coder
## Code After:

import umsgpack
from message_coder import MessageCoderBase

umsgpack.compatibility = True

# set of functions to encode/decode data tokens to/from a json description
class MessageCoder(MessageCoderBase):

    def encode(self, data):
        return umsgpack.packb(data)

    def decode(self, data):
        data = umsgpack.unpackb(data)
        return data
