def METHOD_NAME(lib_fullnames=None):
    """
    Find and load ``libgmt`` as a :py:class:`ctypes.CDLL`.
    Will look for the GMT shared library in the directories determined by
    clib_full_names().
    Parameters
    ----------
    lib_fullnames : list of str or None
        List of possible full names of GMT's shared library. If ``None``, will
        default to ``clib_full_names()``.
    Returns
    -------
    :py:class:`ctypes.CDLL` object
        The loaded shared library.
    Raises
    ------
    GMTCLibNotFoundError
        If there was any problem loading the library (couldn't find it or
        couldn't access the functions).
    """
    if lib_fullnames is None:
        lib_fullnames = clib_full_names()
    error = True
    error_msg = []
    failing_libs = []
    for libname in lib_fullnames:
        try:
            if libname not in failing_libs:  # skip the lib if it's known to fail
                libgmt = ctypes.CDLL(libname)
                check_libgmt(libgmt)
                error = False
                break
        except (OSError, GMTCLibError) as err:
            error_msg.append(f"Error loading GMT shared library at '{libname}'.\n{err}")
            failing_libs.append(libname)
    if error:
        raise GMTCLibNotFoundError("\n".join(error_msg))
    return libgmt