def METHOD_NAME(request):
    try:
        data = request.get_json(force=True)
    except Exception:
        data = dict(request.form) if len(dict(request.form)) else dict(request.args)
    if request.method not in ["POST", "PUT"]:
        return data
    if type(data) is not dict:
        return data
    if data.get("password"):
        data["password"] = "****"
        return data
    if data.get("code"):
        data["code"] = "****"
        return data
    if data.get("guest_properties", {}).get("credentials", {}).get("password"):
        data["guest_properties"]["credentials"]["password"] = "****"
        return data
    if data.get("image", {}).get("file", {}).get("data"):
        data["image"]["file"]["data"] = "[binary removed]"
        return data
    return data