given image index, find out full path

        Parameters:
        ----------
        index: int
            index of a specific image
        Returns:
        ----------
        full path of this image
513582
def image_path_from_index(self, index):
        
        assert self.image_set_index is not None, "Dataset not initialized"
        name = self.image_set_index[index]
        image_file = os.path.join(self.data_path, 'JPEGImages', name + self.extension)
        assert os.path.exists(image_file), 'Path does not exist: {}'.format(image_file)
        return image_file
1162752
def get_full_archive_path(self, path):
        
        return os.path.join(self.archive_dir, path.lstrip('/'))
1370140
def index(self, strictindex):
        
        return self._select(self._pointer.index(self.ruamelindex(strictindex)))
999639
def _find_from_file(full_doc, from_file_keyword):
    
    path = None

    for line in full_doc.splitlines():
        if from_file_keyword in line:
            parts = line.strip().split(':')
            if len(parts) == 2 and parts[0].strip() == from_file_keyword:
                path = parts[1].strip()
                break

    return path
1367851
def get(self, index):
        
        data = self.data
        index2 = self._split(index)
        for c in index2[:-1]:
            i = int(c) - 1
            data = data[i][4]
        return [index[:-2] or ""] + data[int(index[-1]) - 1]
100476
def pathFromIndex(self, index):
        
        out  = []
        while index and index.isValid():
            out.append(nativestring(unwrapVariant(index.data())))
            index = self._model.parent(index)
        
        return self.joiner().join(reversed(out))
117110
def _find_image_ext(path, number=None):
    """"""
    if number is not None:
        path = path.format(number)
    path = os.path.splitext(path)[0]
    for ext in _KNOWN_IMG_EXTS:
        this_path = '%s.%s' % (path, ext)
        if os.path.isfile(this_path):
            break
    else:
        ext = 'png'
    return ('%s.%s' % (path, ext), ext)
15308
def find(self, *index):
        
        assert self.wrapFunction is not None
        if len(index) == 1 and isinstance(index[0], (tuple, list)):
            index = index[0]
        it = self._impl.find(Tuple(index)._impl)
        if it == self._impl.end():
            return None
        else:
            return self.wrapFunction(it)
482818
function(index) {

            var segments = this.segments;
            var numSegments = segments.length;
            if (numSegments === 0) throw new Error('Path has no segments.');

            if (index < 0) index = numSegments + index; // convert negative indices to positive
            if (index >= numSegments || index < 0) throw new Error('Index out of range.');

            return segments[index];
        }
173862
def index(self):
        

        self._index = _C.SDfindattr(self._obj._id, self._name)
        _checkErr('find', self._index, 'illegal attribute name')
        return self._index
1095967
def itemFromIndex(self, index):
        
        sourceIndex = self.mapToSource(index)
        return self.sourceModel().itemFromIndex(sourceIndex)
1057627
def get_chain(self, index):
        
        chain = []
        this = self.leaves[index]
        chain.append((this.val, 'SELF'))
        while this.p:
            chain.append((this.sib.val, this.sib.side))
            this = this.p
        chain.append((this.val, 'ROOT'))
        return chain
1265746
def get_index(self, prefix=''):
        
        if prefix:
            prefixed = '%s_index' % prefix
        else:
            prefixed = 'index'

        if prefixed in self.__cli and self.__cli[prefixed]:
            index = self.__cli.get(prefixed)
            from_conf = False
        else:
            index = self.__config.get(prefixed)
            from_conf = True

        return self.__abspath(index, from_conf)
1145141
def fileInfo(self, index):
        
        return self._fs_model_source.fileInfo(
            self._fs_model_proxy.mapToSource(index))
1298313
def __visit_index_path(self, src, p, k, v):
        
        cp = p + (k,)
        self.path_index[cp] = self.indexed_obj_factory(p, k, v, self.path_index.get(cp))
        if cp in self.path_index:
            # if self.path_index[cp].assert_val_equals(v):
            #     raise ValueError('unexpected value change at path_index[{}]'.format(cp))
            self.path_index[cp].add_src(src)
        else:
            self.path_index[cp] = Flobject(val=v, path=cp, srcs=set([src]))
210567
def get(self, index: int) -> TOption[T]:
        
        return TOption(self[index]) if len(self) > index else TOption(None)
366263
def _is_partial_index(gbi_file):
    
    with open(gbi_file) as in_handle:
        for i, _ in enumerate(in_handle):
            if i > 2:
                return False
    return True