code: def pack(x: Any) -> bytes:
      
      try:
          return msgpack.packb(x, default=encoders)
      except TypeError as exc:
          message = ('Serialization error, check the data passed to a do_ command. '
                     'Cannot serialize this object:\n') + str(exc)[16:]
          raise SerializationError(message)
docs: Encode ``x`` into msgpack with additional encoders.