def find_library(self, libraries):
        '''
        Locates the specified library.

        @libraries - Library name (e.g., 'magic' for libmagic), or a list of names.
 
        Returns a string to be passed to ctypes.cdll.LoadLibrary.
        '''
        lib_path = None

        prefix = binwalk.core.common.get_libs_path()
        
        if isinstance(libraries, str):
            libraries = [libraries]

        for library in libraries:
            system_paths = {
                'linux'   : [os.path.join(prefix, 'lib%s.so' % library), '/usr/local/lib/lib%s.so' % library],
                'cygwin'  : [os.path.join(prefix, 'lib%s.so' % library), '/usr/local/lib/lib%s.so' % library],
                'win32'   : [os.path.join(prefix, 'lib%s.dll' % library), '%s.dll' % library],
                'darwin'  : [os.path.join(prefix, 'lib%s.dylib' % library),
                             '/opt/local/lib/lib%s.dylib' % library,
                             '/usr/local/lib/lib%s.dylib' % library,
                            ] + glob.glob('/usr/local/Cellar/*%s*/*/lib/lib%s.dylib' % (library, library)),
            }

            for i in range(2, 4):
                system_paths['linux%d' % i] = system_paths['linux']

            # Search the common install directories first; these are usually not in the library search path
            # Search these *first*, since a) they are the most likely locations and b) there may be a
            # discrepency between where ctypes.util.find_library and ctypes.cdll.LoadLibrary search for libs.
            for path in system_paths[sys.platform]:
                binwalk.core.common.debug("Searching for '%s'" % path)
                if os.path.exists(path):
                    lib_path = path
                    break

            # If we failed to find the library, check the standard library search paths
            if not lib_path:
                lib_path = ctypes.util.find_library(library)

            # Use the first library that we can find
            if lib_path:
                binwalk.core.common.debug("Found library '%s' at: %s" % (library, lib_path))
                break
            else:
                binwalk.core.common.debug("Could not find library '%s'" % library)

        # If we still couldn't find the library, error out
        if not lib_path:
            raise Exception(str(libraries) % "Failed to locate libraries '%s'")

        return lib_path
dataset/ETHPy150Open devttys0/binwalk/src/binwalk/core/C.py/Library.find_library/swapped operands of `%`