original_string: public function postImport($result, CommandData $commandData) {
      if ($commandData->input()->getOption('userid')) {
        $accountSwitcher = \Drupal::service('account_switcher');
        $this->logger()->notice(dt(
                                    'Switching back from user @uid.',
                                    ['@uid' => \Drupal::currentUser()->id()]
                                  ));
        $accountSwitcher->switchBack();
      }
    }
code: public function postImport($result, CommandData $commandData) {
      if ($commandData->input()->getOption('userid')) {
        $accountSwitcher = \Drupal::service('account_switcher');
        $this->logger()->notice(dt(
                                    'Switching back from user @uid.',
                                    ['@uid' => \Drupal::currentUser()->id()]
                                  ));
        $accountSwitcher->switchBack();
      }
    }
code_tokens: public function postImport ( $ result , CommandData $ commandData ) { if ( $ commandData -> input ( ) -> getOption ( 'userid' ) ) { $ accountSwitcher = \ Drupal :: service ( 'account_switcher' ) ; $ this -> logger ( ) -> notice ( dt ( 'Switching back from user @uid.' , [ '@uid' => \ Drupal :: currentUser ( ) -> id ( ) ] ) ) ; $ accountSwitcher -> switchBack ( ) ; } }
docstring: Switch the user back once the migration is complete.
  
  @hook post-command migrate:import
docstring_tokens: Switch the user back once the migration is complete .