human
What is a the Python program you requested given the following:
Complete the below
def _resolveCtypesImports(cbinaries):

    ''''Completes ctypes BINARY entries for modules with their full path.
    Input is a list of c-binary-names (as found by
    `scan_code_instruction_for_ctypes`). Output is a list of tuples
    ready to be appended to the ``binaries`` of a modules.
    This function temporarily extents PATH, LD_LIBRARY_PATH or
    DYLD_LIBRARY_PATH (depending on the plattform) by CONF[\'pathex\']
    so shared libs will be search there, too.
    Example:
    >>> _resolveCtypesImports([\'libgs.so\'])
    [(libgs.so\', \'\'/usr/lib/libgs.so\', \'BINARY\')]'
    '''
assistant
#Here is the Python program you requested.
    from ctypes.util import find_library
    from ..config import CONF
    if is_unix:
        envvar = 'LD_LIBRARY_PATH'
    elif is_darwin:
        envvar = 'DYLD_LIBRARY_PATH'
    else:
        envvar = 'PATH'
    def _setPaths():
        path = os.pathsep.join(CONF['pathex'])
        old = compat.getenv(envvar)
        if (old is not None):
            path = os.pathsep.join((path, old))
        compat.setenv(envvar, path)
        return old
    def _restorePaths(old):
        if (old is None):
            compat.unsetenv(envvar)
        else:
            compat.setenv(envvar, old)
    ret = []
    old = _setPaths()
    for cbin in cbinaries:
        cpath = find_library(os.path.splitext(cbin)[0])
        if is_unix:
            if (cpath is None):
                cpath = cbin
            for d in compat.getenv(envvar, '').split(os.pathsep):
                if os.path.isfile(os.path.join(d, cpath)):
                    cpath = os.path.join(d, cpath)
                    break
            else:
                if (LDCONFIG_CACHE is None):
                    load_ldconfig_cache()
                if (cpath in LDCONFIG_CACHE):
                    cpath = LDCONFIG_CACHE[cpath]
                    assert os.path.isfile(cpath)
                else:
                    cpath = None
        if (cpath is None):
            if (not include_library(cbin)):
                continue
            logger.warning('library    %s    required    via    ctypes    not    found', cbin)
        else:
            if (not include_library(cpath)):
                continue
            ret.append((cbin, cpath, 'BINARY'))
    _restorePaths(old)
    return ret