code: def find_library_darwin(cls):
          
          dll = Library.JLINK_SDK_NAME
          root = os.path.join('/', 'Applications', 'SEGGER')
          if not os.path.isdir(root):
              return
  
          for d in os.listdir(root):
              dir_path = os.path.join(root, d)
  
              # Navigate through each JLink directory.
              if os.path.isdir(dir_path) and d.startswith('JLink'):
                  files = list(f for f in os.listdir(dir_path) if
                               os.path.isfile(os.path.join(dir_path, f)))
  
                  # For versions >= 6.0.0 and < 5.0.0, this file will exist, so
                  # we want to use this one instead of the versioned one.
                  if (dll + '.dylib') in files:
                      yield os.path.join(dir_path, dll + '.dylib')
  
                  # For versions >= 5.0.0 and < 6.0.0, there is no strictly
                  # linked library file, so try and find the versioned one.
                  for f in files:
                      if f.startswith(dll):
                          yield os.path.join(dir_path, f)
docs: Loads the SEGGER DLL from the installed applications.
  
          This method accounts for the all the different ways in which the DLL
          may be installed depending on the version of the DLL.  Always uses
          the first directory found.
  
          SEGGER's DLL is installed in one of three ways dependent on which
          which version of the SEGGER tools are installed:
  
          ======== ============================================================
          Versions Directory
          ======== ============================================================
          < 5.0.0  ``/Applications/SEGGER/JLink\\ NUMBER``
          < 6.0.0  ``/Applications/SEGGER/JLink/libjlinkarm.major.minor.dylib``
          >= 6.0.0 ``/Applications/SEGGER/JLink/libjlinkarm``
          ======== ============================================================
  
          Args:
            cls (Library): the ``Library`` class
  
          Returns:
            The path to the J-Link library files in the order they are found.