<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def evaluate_code(self, code):
 """ Evaluates given code into the interactive console. :param code: Code to evaluate. :type code: unicode :return: Method success. :rtype: bool """


        if not code:
            return False

        LOGGER.debug("> Evaluating given code.")

        code = code.endswith("\n") and code or "{0}\n".format(code)

        code = code.split("\n", 3)
        for i, line in enumerate(code[:-2]):
            if "coding" in line:
                code[i] = line.replace("=", "\=").replace(":", "\:")
                break
        code = "\n".join(code)

        sys.stdout.write(code)
        self.__console.runcode(code)
        return True