original_string: public static function is_mlbackend_used($plugin) {
          $models = self::get_all_models();
          foreach ($models as $model) {
              $processor = $model->get_predictions_processor();
              $noprefixnamespace = ltrim(get_class($processor), '\\');
              $processorplugin = substr($noprefixnamespace, 0, strpos($noprefixnamespace, '\\'));
              if ($processorplugin == $plugin) {
                  return true;
              }
          }
  
          // Default predictions processor.
          $defaultprocessorclass = get_config('analytics', 'predictionsprocessor');
          $pluginclass = '\\' . $plugin . '\\processor';
          if ($pluginclass === $defaultprocessorclass) {
              return true;
          }
  
          return false;
      }
code: public static function is_mlbackend_used($plugin) {
          $models = self::get_all_models();
          foreach ($models as $model) {
              $processor = $model->get_predictions_processor();
              $noprefixnamespace = ltrim(get_class($processor), '\\');
              $processorplugin = substr($noprefixnamespace, 0, strpos($noprefixnamespace, '\\'));
              if ($processorplugin == $plugin) {
                  return true;
              }
          }
  
          // Default predictions processor.
          $defaultprocessorclass = get_config('analytics', 'predictionsprocessor');
          $pluginclass = '\\' . $plugin . '\\processor';
          if ($pluginclass === $defaultprocessorclass) {
              return true;
          }
  
          return false;
      }
code_tokens: public static function is_mlbackend_used ( $ plugin ) { $ models = self :: get_all_models ( ) ; foreach ( $ models as $ model ) { $ processor = $ model -> get_predictions_processor ( ) ; $ noprefixnamespace = ltrim ( get_class ( $ processor ) , '\\' ) ; $ processorplugin = substr ( $ noprefixnamespace , 0 , strpos ( $ noprefixnamespace , '\\' ) ) ; if ( $ processorplugin == $ plugin ) { return true ; } } // Default predictions processor. $ defaultprocessorclass = get_config ( 'analytics' , 'predictionsprocessor' ) ; $ pluginclass = '\\' . $ plugin . '\\processor' ; if ( $ pluginclass === $ defaultprocessorclass ) { return true ; } return false ; }
docstring: Whether the provided plugin is used by any model.
  
  @param string $plugin
  @return bool
docstring_tokens: Whether the provided plugin is used by any model .