Can't we just initialize `code_str` with the "if" to begin with? This conditional seems unnecessary.