docs: def _make_ipmi_payload(self, netfn, command, bridge_request=None, data=()):
          """This function generates the core ipmi payload that would be
          applicable for any channel (including KCS)
          """
          bridge_msg = []
          self.expectedcmd = command
          # in ipmi, the response netfn is always one
          self.expectednetfn = netfn + 1
          # higher than the request payload, we assume
          # we are always the requestor for now
          seqincrement = 7  # IPMI spec forbids gaps bigger then 7 in seq number.
          # Risk the taboo rather than violate the rules
          while (not self.servermode and
                  (netfn, command, self.seqlun) in self.tabooseq and
                 self.tabooseq[(netfn, command, self.seqlun)] and seqincrement):
              self.tabooseq[(self.expectednetfn, command, self.seqlun)] -= 1
              # Allow taboo to eventually expire after a few rounds
              self.seqlun += 4  # the last two bits are lun, so add 4 to add 1
              self.seqlun &= 0xff  # we only have one byte, wrap when exceeded
              seqincrement -= 1
  
          if bridge_request:
              addr = bridge_request.get('addr', 0x0)
              channel = bridge_request.get('channel', 0x0)
              bridge_msg = self._make_bridge_request_msg(channel, netfn, command)
              # NOTE(fengqian): For bridge request, rsaddr is specified and
              # rqaddr is BMC address.
              rqaddr = constants.IPMI_BMC_ADDRESS
              rsaddr = addr
          else:
              rqaddr = self.rqaddr
              rsaddr = constants.IPMI_BMC_ADDRESS
          if self.servermode:
              rsaddr = self.clientaddr
          # figure 13-4, first two bytes are rsaddr and
          # netfn, for non-bridge request, rsaddr is always 0x20 since we are
          # addressing BMC while rsaddr is specified forbridge request
          header = bytearray((rsaddr, netfn << 2))
  
          reqbody = bytearray((rqaddr, self.seqlun, command)) + data
          headsum = bytearray((_checksum(*header),))
          bodysum = bytearray((_checksum(*reqbody),))
          payload = header + headsum + reqbody + bodysum
          if bridge_request:
              payload = bridge_msg + payload
              # NOTE(fengqian): For bridge request, another check sum is needed.
              tail_csum = _checksum(*payload[3:])
              payload.append(tail_csum)
  
          if not self.servermode:
              self._add_request_entry((self.expectednetfn, self.seqlun, command))
          return payload