class_docstr: FileCollectionController inherits from BaseController and manages business logic related to the
  file system.
  
  Methods
  -------
  create(paths)
      create a file collection within the project
  list()
      list all file collections within the project
  delete(id)
      delete the specified file collection from the project
class_docstr_tok: ["FileCollectionController","inherits","from","BaseController","and","manages","business","logic","related","to","the","file","system",".","Methods","--","--","--","-","create","(","paths",")","create","a","file","collection","within","the","project","list","(",")","list","all","file","collections","within","the","project","delete","(","id",")","delete","the","specified","file","collection","from","the","project"]
docstr: Checkout to specific file collection id
  
  Returns
  -------
  bool
      True if success
  
  Raises
  ------
  FileNotInitialized
      error if not initialized (must initialize first)
  UnstagedChanges
      error if not there exists unstaged changes in files
docstr_tok: ["Checkout","to","specific","file","collection","id","Returns","--","--","--","-","bool","True","if","success","Raises","--","--","--","FileNotInitialized","error","if","not","initialized","(","must","initialize","first",")","UnstagedChanges","error","if","not","there","exists","unstaged","changes","in","files"]
code: def checkout(self, file_collection_id):
      """Checkout to specific file collection id
  
      Returns
      -------
      bool
          True if success
  
      Raises
      ------
      FileNotInitialized
          error if not initialized (must initialize first)
      UnstagedChanges
          error if not there exists unstaged changes in files
      """
      if not self.is_initialized:
          raise FileNotInitialized()
      if not self.exists(file_collection_id=file_collection_id):
          raise PathDoesNotExist(
              __("error", "controller.file_collection.checkout_file")
          )
      # Check if unstaged changes exist
      self.check_unstaged_changes()
      # Check if environment has is same as current
      results = self.dal.file_collection.query(
          {"id": file_collection_id}
      )
      file_collection_obj = results[0]
      file_hash = file_collection_obj.filehash
  
      if self._calculate_project_files_hash() == file_hash:
          return True
      # Remove all content from `datmo_file` folder
      # TODO Use datmo environment path as a class attribute
      for file in os.listdir(self.file_driver.files_directory):
          file_path = os.path.join(
              self.file_driver.files_directory, file
          )
          try:
              if os.path.isfile(file_path):
                  os.remove(file_path)
              elif os.path.isdir(file_path):
                  shutil.rmtree(file_path)
          except Exception as e:
              print(e)
      # Add in files for that file collection id
      file_collection_path = os.path.join(
          self.home, file_collection_obj.path
      )
      self.file_driver.copytree(
          file_collection_path, self.file_driver.files_directory
      )
      return True
  
file_path: datmo/datmo/core/controller/file/file_collection.py
imports: import os
  import shutil
  from datmo.core.util.i18n import get
  from datmo.core.controller.base import BaseController
  from datmo.core.util.misc_functions import list_all_filepaths, get_datmo_temp_path
  from datmo.core.entity.file_collection import FileCollection
  from datmo.core.util.exceptions import PathDoesNotExist, EnvironmentInitFailed, FileNotInitialized, UnstagedChanges
label_desc: Use image node_id 10 for calling the FileCollectionController obj's underlying member method code with example usage: obj.checkout(file_collection_id) and returns: True, True