docs: def get_libsodium():
      '''Locate the libsodium C library'''
  
      __SONAMES = (13, 10, 5, 4)
      # Import libsodium from system
      sys_sodium = ctypes.util.find_library('sodium')
      if sys_sodium is None:
          sys_sodium = ctypes.util.find_library('libsodium')
  
      if sys_sodium:
          try:
              return ctypes.CDLL(sys_sodium)
          except OSError:
              pass
  
      # Import from local path
      if sys.platform.startswith('win'):
  
          try:
              return ctypes.cdll.LoadLibrary('libsodium')
          except OSError:
              pass
          for soname_ver in __SONAMES:
              try:
                  return ctypes.cdll.LoadLibrary(
                      'libsodium-{0}'.format(soname_ver)
                  )
              except OSError:
                  pass
      elif sys.platform.startswith('darwin'):
          try:
              return ctypes.cdll.LoadLibrary('libsodium.dylib')
          except OSError:
              try:
                  libidx = __file__.find('lib')
                  if libidx > 0:
                      libpath = __file__[0:libidx+3] + '/libsodium.dylib'
                      return ctypes.cdll.LoadLibrary(libpath)
              except OSError:
                  pass
      else:
          try:
              return ctypes.cdll.LoadLibrary('libsodium.so')
          except OSError:
              pass
  
          for soname_ver in __SONAMES:
              try:
                  return ctypes.cdll.LoadLibrary(
                      'libsodium.so.{0}'.format(soname_ver)
                  )
              except OSError:
                  pass