def _wait_until_done(self, operation):
operation_name = operation['<STR_LIT:name>']<EOL>if '<STR_LIT>' in operation:<EOL><INDENT>zone_url_parts = operation['<STR_LIT>'].split('<STR_LIT:/>')<EOL>project = zone_url_parts[-<NUM_LIT:3>]<EOL>zone = zone_url_parts[-<NUM_LIT:1>]<EOL>def get_zone_operation():<EOL><INDENT>return self._compute.zoneOperations().get(<EOL>project=project,<EOL>zone=zone,<EOL>operation=operation_name<EOL>)<EOL><DEDENT>update = get_zone_operation<EOL><DEDENT>else:<EOL><INDENT>project = operation['<STR_LIT>'].split('<STR_LIT:/>')[-<NUM_LIT:4>]<EOL>def get_global_operation():<EOL><INDENT>return self._compute.globalOperations().get(<EOL>project=project,<EOL>operation=operation_name<EOL>)<EOL><DEDENT>update = get_global_operation<EOL><DEDENT>done = False<EOL>latest_operation = None<EOL>start = time()<EOL>timeout = <NUM_LIT:5>*<NUM_LIT>  <EOL>while not done:<EOL><INDENT>latest_operation = update().execute()<EOL>if (latest_operation['<STR_LIT:status>'] == '<STR_LIT>' or<EOL>time() - start > timeout):<EOL><INDENT>done = True<EOL><DEDENT>else:<EOL><INDENT>sleep(<NUM_LIT:10>)<EOL>log_yellow("<STR_LIT>")<EOL><DEDENT><DEDENT>return latest_operation<EOL>
Perform a GCE operation, blocking until the operation completes.

This function will then poll the operation until it reaches state
'DONE' or times out, and then returns the final operation resource
dict.

:param operation: A dict representing a pending GCE operation resource.

:returns dict: A dict representing the concluded GCE operation
    resource.