def METHOD_NAME(fname: str, compress: bool = True) -> Any:
    fname = os.path.expanduser(fname)
    _open = gzip.open if compress else open
    with _open(fname, "rb") as f:  # type: ignore[operator]
        return cloudpickle.METHOD_NAME(f)