'Given an offset in to the packfile return the object that is there.
Using the associated index the location of an object can be looked up,
and then the packfile can be asked directly for that object using this
function.'

def get_object_at(self, offset):

    try:
        return self._offset_cache[offset]
    except KeyError:
        pass
    assert (offset >= self._header_size)
    self._file.seek(offset)
    (unpacked, _) = unpack_object(self._file.read)
    return (unpacked.pack_type_num, unpacked._obj())
