def METHOD_NAME(filePath: str | pathlib.Path) -> t.Any:
    '''
    Read a gzip-compressed pickle file, uncompress it, unpickle it, and
    return the contents.
    '''
    preparePathClassesForUnpickling()
    with gzip.open(filePath, 'rb') as pickledFile:
        try:
            uncompressed = pickledFile.read()
            newMdb = pickle.loads(uncompressed)
        except Exception as e:
            # pickle exceptions cannot be caught directly
            # because they might come from pickle or _pickle and the latter cannot
            # be caught.
            restorePathClassesAfterUnpickling()
            raise Music21Exception('Cannot load file ' + str(filePath)) from e
    restorePathClassesAfterUnpickling()
    return newMdb