def _translate_index(self, index, offset):

        if isinstance(index, slice):
            index = slice(index.start+offset, index.stop+offset, index.step)

        else:
            index = index + offset

        return index

#### EOF ######################################################################
Turn this object into a dict.
dataset/ETHPy150Open enthought/envisage/envisage/provider_extension_registry.py/ProviderExtensionRegistry._translate_index--crossover with--dataset/ETHPy150Open openstack/ironic-python-agent/ironic_python_agent/encoding.py/Serializable.serialize