class_docstr: CodeController inherits from BaseController and manages business logic related to the
  code.
  
  Methods
  -------
  create(code_id=None)
      create a code object within the project
  list()
      list all code objects within the project
  delete(id)
      delete the specified code object from the project
docstr: Checkout to specific code id
  
  Parameters
  ----------
  code_id : str
      code id to checkout to
  
  Returns
  -------
  bool
      True if success
  
  Raises
  ------
  CodeDoesNotExist
      if code id does not exist
  CodeNotInitialized
      error if not initialized (must initialize first)
  UnstagedChanges
      error if not there exists unstaged changes in code
docstr_tok: ["Checkout","to","specific","code","id","Parameters","--","--","--","--","--","code_id",":","str","code","id","to","checkout","to","Returns","--","--","--","-","bool","True","if","success","Raises","--","--","--","CodeDoesNotExist","if","code","id","does","not","exist","CodeNotInitialized","error","if","not","initialized","(","must","initialize","first",")","UnstagedChanges","error","if","not","there","exists","unstaged","changes","in","code"]
code: def checkout(self, code_id):
      """Checkout to specific code id
  
      Parameters
      ----------
      code_id : str
          code id to checkout to
  
      Returns
      -------
      bool
          True if success
  
      Raises
      ------
      CodeDoesNotExist
          if code id does not exist
      CodeNotInitialized
          error if not initialized (must initialize first)
      UnstagedChanges
          error if not there exists unstaged changes in code
  
      """
      if not self.exists(code_id):
          raise CodeDoesNotExist(
              __("error", "controller.code.checkout", code_id)
          )
      code_obj = self.dal.code.get_by_id(code_id)
      return self.code_driver.checkout_ref(code_obj.commit_id)
  
file_path: datmo/datmo/core/controller/code/code.py
imports: from datmo.core.util.i18n import get
  from datmo.core.controller.base import BaseController
  from datmo.core.entity.code import Code
  from datmo.core.util.exceptions import PathDoesNotExist, EnvironmentInitFailed, ArgumentError, CodeDoesNotExist
label_desc: Use image node_id 8 for calling the CodeController obj's underlying member method code with example usage: obj.checkout(code_id) and returns: self