parameters: (self, dtb: int, data: bytes, data_offset: int)
return_statement: return None
docstring: Re-reads over the whole page to validate other records based on the
          number of pages marked user vs super.
  
          Args:
              dtb: The identified dtb that needs validating
              data: The chunk of data that contains the dtb to be validated
              data_offset: Where, within the layer, the chunk of data lives
  
          Returns:
              A valid DTB within this page
docstring_summary: Re-reads over the whole page to validate other records based on the
          number of pages marked user vs super.
docstring_tokens: Re - reads over the whole page to validate other records based on the number of pages marked user vs super .
function: def second_pass(self, dtb: int, data: bytes, data_offset: int) -> Optional[Tuple[int, Any]]:
          """Re-reads over the whole page to validate other records based on the
          number of pages marked user vs super.
  
          Args:
              dtb: The identified dtb that needs validating
              data: The chunk of data that contains the dtb to be validated
              data_offset: Where, within the layer, the chunk of data lives
  
          Returns:
              A valid DTB within this page
          """
          page = data[dtb - data_offset:dtb - data_offset + self.page_size]
          usr_count, sup_count = 0, 0
          for i in range(0, self.page_size, self.ptr_size):
              val = self._unpack(page[i:i + self.ptr_size])
              if val & 0x1:
                  sup_count += 0 if (val & 0x4) else 1
                  usr_count += 1 if (val & 0x4) else 0
          # print(hex(dtb), usr_count, sup_count, usr_count + sup_count)
          # We sometimes find bogus DTBs at 0x16000 with a very low sup_count and 0 usr_count
          # I have a winxpsp2-x64 image with identical usr/sup counts at 0x16000 and 0x24c00 as well as the actual 0x3c3000
          if usr_count or sup_count > 5:
              return dtb, None
          return None
function_tokens: def second_pass ( self , dtb : int , data : bytes , data_offset : int ) -> Optional [ Tuple [ int , Any ] ] : page = data [ dtb - data_offset : dtb - data_offset + self . page_size ] usr_count , sup_count = 0 , 0 for i in range ( 0 , self . page_size , self . ptr_size ) : val = self . _unpack ( page [ i : i + self . ptr_size ] ) if val & 0x1 : sup_count += 0 if ( val & 0x4 ) else 1 usr_count += 1 if ( val & 0x4 ) else 0 # print(hex(dtb), usr_count, sup_count, usr_count + sup_count) # We sometimes find bogus DTBs at 0x16000 with a very low sup_count and 0 usr_count # I have a winxpsp2-x64 image with identical usr/sup counts at 0x16000 and 0x24c00 as well as the actual 0x3c3000 if usr_count or sup_count > 5 : return dtb , None return None