def METHOD_NAME(data, name=None):
    # This only works with lists or dicts but we shouldn't need anything
    # else.
    if isinstance(data, (list, dict)):
        items = data.items() if isinstance(data, dict) else enumerate(data)
        for key, value in items:
            data[key] = METHOD_NAME(value, name=key)
    elif (
        isinstance(data, str)
        and isinstance(name, str)
        and name.lower() in SENTRY_SENSITIVE_FIELDS
    ):
        data = '*** redacted ***'
    return data