code: def register(name, klass, instance=None, *, preferred=False):
      """Register a browser connector."""
      with _lock:
          if _tryorder is None:
              register_standard_browsers()
          _browsers[name.lower()] = [klass, instance]
  
          # Preferred browsers go to the front of the list.
          # Need to match to the default browser returned by xdg-settings, which
          # may be of the form e.g. "firefox.desktop".
          if preferred or (
              _os_preferred_browser and name in _os_preferred_browser
          ):
              _tryorder.insert(0, name)
          else:
              _tryorder.append(name)
  
imports: import os
  import shlex
  import shutil
  import sys
  import subprocess
  import threading
  import warnings
label_desc: Use image node_id 1 for calling a global function with example usage: register(name, klass, instance) without return types