def METHOD_NAME():
    """
    Load the library if it isn't loaded already
    """
    global cudaLib
    ret = True
    if cudaLib == None:
        # lock to ensure only one caller loads the library
        libLoadLock.acquire()
        try:
            # ensure the library still isn't loaded
            if cudaLib == None:
                try:
                    if sys.platform[:3] == "win":
                        # cdecl calling convention
                        # load cuda.dll from %ProgramFiles%/NVIDIA Corporation/NVSMI/cuda.dll
                        cudaLib = CDLL(os.path.join(os.getenv("ProgramFiles", "C:/Program Files"), "NVIDIA Corporation/NVSMI/cuda.dll"))
                    else:
                        # assume linux
                        cudaLib = CDLL("libnvidia-ml.so.1")
                except OSError as ose:
                    pass
                if cudaLib == None:
                    ret = False
        finally:
            # lock is always freed
            libLoadLock.release()
    return ret