def __getitem__(self, key):
        # There's no custom logic to be implemented in __getslice__, so it's
        # not overloaded intentionally.
        getitem = self._data.__getitem__
        promote = self._shallow_copy

        if lib.isscalar(key):
            return getitem(key)

        if isinstance(key, slice):
            # This case is separated from the conditional above to avoid
            # pessimization of basic indexing.
            return promote(getitem(key))

        if is_bool_indexer(key):
            key = np.asarray(key)

        key = _values_from_object(key)
        result = getitem(key)
        if not lib.isscalar(result):
            return promote(result)
        else:
            return result
Create a temp file based on path and open for reading and writing.
dataset/ETHPy150Open pydata/pandas/pandas/indexes/base.py/Index.__getitem__--crossover with--dataset/ETHPy150Open babble/babble/include/jython/Lib/mailbox.py/_create_temporary