def METHOD_NAME(msg):
    """Decodes msg and returns its parts"""
    unpickler = Unpickler(BytesIO(msg))
    unpickler.find_global = find_global
    try:
        # PyPy, zodbpickle, the non-c-accelerated version
        unpickler.find_class = find_global
    except AttributeError:
        pass
    try:
        return unpickler.load()  # msgid, flags, name, args
    except:  # NOQA: E722 bare except
        logger.error("can't decode message: %s" % short_repr(msg))
        raise