def METHOD_NAME(cls, to_name, value_name, needs_check, emit, context):
    if value_name.c_type == cls.c_type:
        emit("%s = %s;" % (to_name, value_name))
    else:
        value_name.getCType().emitAssignmentCodeToNuitkaBool(
            to_name=to_name,
            value_name=value_name,
            needs_check=needs_check,
            emit=emit,
            context=context,
        )
        getReleaseCode(value_name, emit, context)