

def __getitem__(self, index):
    current_run_start_offset = 0
    if (index < 0):
        index = (len(self) + current_run_start_offset)
    for (cluster_offset, num_clusters) in self._runentries:
        run_length = (num_clusters * self._clusters.get_cluster_size())
        if (current_run_start_offset <= index < (current_run_start_offset + run_length)):
            i = (index - current_run_start_offset)
            cluster = self._clusters[cluster_offset]
            return cluster[i]
        current_run_start_offset += run_length
    raise IndexError(('%d is greater than the non resident attribute data length %s' % (index, len(self))))

dataset/ETHPy150Open williballenthin/python-ntfs/ntfs/filesystem/__init__.py NonResidentAttributeData.__getitem__/VarMisuse@33/42 `index`->`current_run_start_offset`