code: def send_compound(self, messages, sid, tid, related=False):
          
          send_data = b""
          session = self.session_table[sid]
          tree = session.tree_connect_table[tid]
          requests = []
  
          total_requests = len(messages)
          for i, message in enumerate(messages):
              if i == total_requests - 1:
                  next_command = 0
                  padding = b""
              else:
                  msg_length = 64 + len(message)
  
                  # each compound message must start at the 8-byte boundary
                  mod = msg_length % 8
                  padding_length = 8 - mod if mod > 0 else 0
                  padding = b"\x00" * padding_length
                  next_command = msg_length + padding_length
  
              header = self._generate_packet_header(message, sid, tid, None)
              header['next_command'] = next_command
              if i != 0 and related:
                  header['session_id'] = b"\xff" * 8
                  header['tree_id'] = b"\xff" * 4
                  header['flags'].set_flag(
                      Smb2Flags.SMB2_FLAGS_RELATED_OPERATIONS
                  )
  
              if session.signing_required and session.signing_key:
                  self._sign(header, session, padding=padding)
              send_data += header.pack() + padding
  
              request = Request(header)
              requests.append(request)
              self.outstanding_requests[header['message_id'].get_value()] = \
                  request
  
          if session.encrypt_data or tree.encrypt_data:
              send_data = self._encrypt(send_data, session)
  
          self.transport.send(send_data)
  
          return requests
docs: Sends multiple messages within 1 TCP request, will fail if the size
          of the total length exceeds the maximum of the transport max.
  
          :param messages: A list of messages to send to the server
          :param sid: The session_id that the request is sent for
          :param tid: A tree_id object that the message is sent for
          :return: List<Request> for each request that was sent, each entry in
              the list is in the same order of the message list that was passed
              in