def METHOD_NAME(statement, emit, context):
    set_arg_name = context.allocateTempName("add_set")
    generateExpressionCode(
        to_name=set_arg_name,
        expression=statement.subnode_set_arg,
        emit=emit,
        context=context,
    )
    value_arg_name = context.allocateTempName("add_value")
    generateExpressionCode(
        to_name=value_arg_name,
        expression=statement.subnode_value,
        emit=emit,
        context=context,
    )
    context.setCurrentSourceCodeReference(statement.getSourceReference())
    res_name = context.getIntResName()
    emit("assert(PySet_Check(%s));" % set_arg_name)
    emit("%s = PySet_Add(%s, %s);" % (res_name, set_arg_name, value_arg_name))
    getErrorExitBoolCode(
        condition="%s == -1" % res_name,
        release_names=(set_arg_name, value_arg_name),
        emit=emit,
        context=context,
    )