Add a condition to show menu link in YML how should I do if I need to show to a link menu based on a condition ?

This is my YML for my menu link : 

double_vue_klesia.backuserswitch:
  title: 'Retour user précédent'
  menu_name: navigation-principale
  description: 'Switch back to your user account.'
  route_name: double_vue_klesia.backuser.switch
  weight: 1


I want to show this link only : 

if (\Drupal::service('userswitch')-&gt;isSwitchUser())


This is in PHP, but I need this to be on YML (unless there a way to intercept it in php and hide it ?).

If my isSwtichUser is true (from my service), I want to show the link. But I can find a way to do it. 

EDIT :

I'm using this module : https://www.drupal.org/project/userswitch

I "just" need to display a link to go back to the original user (link accessible from my frontend)
you can add custom access on route_name: double_vue_klesia.backuser.switch

double_vue_klesia.backuser.switch:
  path: '/path-of-you'
  defaults:
    _form:  '\Drupal\my_module\Form\DemoForm'
    _title: 'title'
  requirements:
    _custom_access: '\Drupal\my_module\Controller\ApplicationController::accessCustom'


Inside \Drupal\my_module\Controller\ApplicationController:

 /**
   * Check user has permission.
   *
   * @return \Drupal\Core\Access\AccessResult
   */
  public function accessCustom() {
    if (if (\Drupal::service('userswitch')-&gt;isSwitchUser())) {
      return AccessResult::allowed();
    }
    return AccessResult::forbidden();
  }