def METHOD_NAME(self, path, code, msg, alternative=None):
    return {
        "status": "error",
        "messageType": "DIRECTORY_LISTING_FAILED",
        "path": path,
        "code": code,
        "msg": msg,
        "alternative": alternative,
    }