human
Complete the below
def _NeedsIndexes(func):

    ''''A decorator for DatastoreStub methods that require or affect indexes.
    Updates indexes to match index.yaml before the call and updates index.yaml
    after the call if require_indexes is False. If root_path is not set, this is a
    no op.'
    '''
 ... Give me a the Python program you requested?
assistant
#Here is the Python program you requested.
    def UpdateIndexesWrapper(self, *args, **kwargs):
        self._SetupIndexes()
        try:
            return func(self, *args, **kwargs)
        finally:
            self._UpdateIndexes()
    return UpdateIndexesWrapper