code: async def sign_data(self, msg: bytes) -> bytes:
          
  
          def transform_cb(arr_ptr: POINTER(c_uint8), arr_len: c_uint32):
              return bytes(arr_ptr[:arr_len]),
  
          if not hasattr(Connection.sign_data, "cb"):
              self.logger.debug("vcx_connection_sign_data: Creating callback")
              Connection.sign_data.cb = create_cb(CFUNCTYPE(None, c_uint32, c_uint32, POINTER(c_uint8), c_uint32), transform_cb)
  
          c_connection_handle = c_uint32(self.handle)
          c_msg_len = c_uint32(len(msg))
  
          result = await do_call('vcx_connection_sign_data',
                                 c_connection_handle,
                                 msg,
                                 c_msg_len,
                                 Connection.sign_data.cb)
  
          self.logger.debug("vcx_connection_sign_data completed")
          return result
docs: Sign data using connection's pairwise key
          :param msg:
          :return: signature