docs: def need_finalize(cls, resource):
          """Check if vm migration need to be finalized."""
          vm_id = cls.usable_id(resource)
          params = {'type': 'hosting_migration_vm',
                    'step': 'RUN',
                    'vm_id': vm_id}
          result = cls.call('operation.list', params)
          if not result or len(result) > 1:
              raise MigrationNotFinalized('Cannot find VM %s '
                                          'migration operation.' % resource)
  
          need_finalize = result[0]['params']['inner_step'] == 'wait_finalize'
          if not need_finalize:
              raise MigrationNotFinalized('VM %s migration does not need '
                                          'finalization.' % resource)