def METHOD_NAME():
  container = self._GetContainerInstance()['containers'][0]
  state = container['instanceView']['currentState']['state']
  if state != 'Terminated':
    raise container_service.RetriableContainerException(
        f'Container in ({state}). Not yet in expected state Terminated.')
  return container