def METHOD_NAME(
    cls, value_name, needs_release, tmp_name, ref_count, inplace, emit, context
):
    assert not inplace
    if tmp_name.c_type == "nuitka_bool":
        emit("%s = %s;" % (value_name, tmp_name))
    else:
        if tmp_name.c_type == "PyObject *":
            test_code = "%s == Py_True" % tmp_name
        else:
            assert False, tmp_name
        cls.emitAssignmentCodeFromBoolCondition(
            to_name=value_name, condition=test_code, emit=emit
        )
        # TODO: Refcount and context needs release are redundant.
        if ref_count:
            getReleaseCode(tmp_name, emit, context)