docs: def fetch_sel(self, ipmicmd, clear=False):
          """Fetch SEL entries
  
          Return an iterable of SEL entries.  If clearing is requested,
      the fetch and clear will be done as an atomic operation, assuring
      no entries are dropped.
  
      :param ipmicmd: The Command object to use to interrogate
      :param clear: Whether to clear the entries upon retrieval.
      """
          records = []
          # First we do a fetch all without reservation, reducing the risk
          # of having a long lived reservation that gets canceled in the middle
          endat = self._fetch_entries(ipmicmd, 0, records)
          if clear and records:  # don't bother clearing if there were no records
              # To do clear, we make a reservation first...
              rsp = ipmicmd.xraw_command(netfn=0xa, command=0x42)
              rsvid = struct.unpack_from('<H', rsp['data'])[0]
              # Then we refetch the tail with reservation (check for change)
              del records[-1]  # remove the record that's about to be duplicated
              self._fetch_entries(ipmicmd, endat, records, rsvid)
              # finally clear the SEL
              # 0XAA means start initiate, 0x524c43 is 'RCL' or 'CLR' backwards
              clrdata = bytearray(struct.pack('<HI', rsvid, 0xAA524C43))
              ipmicmd.xraw_command(netfn=0xa, command=0x47, data=clrdata)
          # Now to fixup the record timestamps... first we need to get the BMC
          # opinion of current time
          _fix_sel_time(records, ipmicmd)
          return records