code: def contains_rva(self, rva):
          
  
          # Check if the SizeOfRawData is realistic. If it's bigger than the size of
          # the whole PE file minus the start address of the section it could be
          # either truncated or the SizeOfRawData contains a misleading value.
          # In either of those cases we take the VirtualSize
          #
          if len(self.pe.__data__) - self.pe.adjust_FileAlignment( self.PointerToRawData,
              self.pe.OPTIONAL_HEADER.FileAlignment ) < self.SizeOfRawData:
              # PECOFF documentation v8 says:
              # VirtualSize: The total size of the section when loaded into memory.
              # If this value is greater than SizeOfRawData, the section is zero-padded.
              # This field is valid only for executable images and should be set to zero
              # for object files.
              #
              size = self.Misc_VirtualSize
          else:
              size = max(self.SizeOfRawData, self.Misc_VirtualSize)
  
          VirtualAddress_adj = self.pe.adjust_SectionAlignment( self.VirtualAddress,
              self.pe.OPTIONAL_HEADER.SectionAlignment, self.pe.OPTIONAL_HEADER.FileAlignment )
  
          # Check whether there's any section after the current one that starts before the
          # calculated end for the current one. If so, cut the current section's size
          # to fit in the range up to where the next section starts.
          if (self.next_section_virtual_address is not None and
              self.next_section_virtual_address > self.VirtualAddress and
              VirtualAddress_adj + size > self.next_section_virtual_address):
                  size = self.next_section_virtual_address - VirtualAddress_adj
  
          return VirtualAddress_adj <= rva < VirtualAddress_adj + size
docs: Check whether the section contains the address provided.