def reset_pos(func):
    """Decorator for reseting previous position in file-like object
    after a method call
    """

    def _reset_pos(self, *args, **kwargs):
        reset_pos = self.pos
        self.pos = 0
        return func(self, *args, **kwargs)
        self.pos = reset_pos

    return _reset_pos