def poll_operation_until_done(self, name, polling_interval_in_seconds):
while True:<EOL><INDENT>result = self.get_operation(name)<EOL>state = result['<STR_LIT>']['<STR_LIT>']['<STR_LIT:state>']<EOL>if state == '<STR_LIT>':<EOL><INDENT>self.log.info('<STR_LIT>'<EOL>.format(polling_interval_in_seconds))<EOL>time.sleep(polling_interval_in_seconds)<EOL><DEDENT>else:<EOL><INDENT>return result<EOL><DEDENT><DEDENT>
Poll backup operation state until it's completed.

:param name: the name of the operation resource
:type name: str
:param polling_interval_in_seconds: The number of seconds to wait before calling another request.
:type polling_interval_in_seconds: int
:return: a resource operation instance.
:rtype: dict