code: def encode(self, envelope, session, target=None, modification_code=None, **kwargs):
  		
  		self.__args_check(envelope, target, modification_code)
  
  		if isinstance(envelope, WMessengerTextEnvelope):
  			target_envelope_cls = WMessengerTextEnvelope
  		else:  # isinstance(envelope, WMessengerBytesEnvelope)
  			target_envelope_cls = WMessengerBytesEnvelope
  
  		if target == WMessengerFixedModificationLayer.Target.head:
  			return target_envelope_cls(modification_code + envelope.message(), meta=envelope)
  		else:  # target == WMessengerFixedModificationLayer.Target.tail
  			return target_envelope_cls(envelope.message() + modification_code, meta=envelope)
docs: Methods appends 'modification_code' to the specified envelope.
  
  		:param envelope: original envelope
  		:param session: original session
  		:param target: flag, that specifies whether code must be appended to the start or to the end
  		:param modification_code: code to append
  		:param kwargs: additional arguments
  
  		:return: WMessengerTextEnvelope or WMessengerBytesEnvelope (depends on the original envelope)