class_docstr: EnvironmentController inherits from BaseController and manages business logic related to the
  environment.
  
  Methods
  -------
  create(dictionary)
      Create an environment within the project
  build(id)
      Build the environment for use within the project
  list()
      List all environments within the project
  delete(id)
      Delete the specified environment from the project
class_docstr_tok: ["EnvironmentController","inherits","from","BaseController","and","manages","business","logic","related","to","the","environment",".","Methods","--","--","--","-","create","(","dictionary",")","Create","an","environment","within","the","project","build","(","id",")","Build","the","environment","for","use","within","the","project","list","(",")","List","all","environments","within","the","project","delete","(","id",")","Delete","the","specified","environment","from","the","project"]
docstr: Setup compatible environment from user paths. Creates the necessary datmo files if
  they are not already present
  
  Parameters
  ----------
  create_dict : dict
      dictionary for entity creation, this is mutated in the function (not returned)
  paths : list
      list of absolute or relative filepaths and/or dirpaths to collect with destination names
      (e.g. "/path/to/file>hello", "/path/to/file2", "/path/to/dir>newdir")
  directory : str
      path of directory to save additional files to
  save_hardware_file : bool
      boolean to save hardware file along with other files
      (default is True to save the file and create distinct hashes based on software and hardware)
  
  Returns
  -------
  paths : list
      returns the input paths with the paths of the new files created appended
docstr_tok: ["Setup","compatible","environment","from","user","paths",".","Creates","the","necessary","datmo","files","if","they","are","not","already","present","Parameters","--","--","--","--","--","create_dict",":","dict","dictionary","for","entity","creation",",","this","is","mutated","in","the","function","(","not","returned",")","paths",":","list","list","of","absolute","or","relative","filepaths","and\/or","dirpaths","to","collect","with","destination","names","(","e.g",".","``","\/path\/to\/file",">","hello","''",",","``","\/path\/to\/file2","''",",","``","\/path\/to\/dir",">","newdir","''",")","directory",":","str","path","of","directory","to","save","additional","files","to","save_hardware_file",":","bool","boolean","to","save","hardware","file","along","with","other","files","(","default","is","True","to","save","the","file","and","create","distinct","hashes","based","on","software","and","hardware",")","Returns","--","--","--","-","paths",":","list","returns","the","input","paths","with","the","paths","of","the","new","files","created","appended"]
code: def _setup_compatible_environment(
      self, create_dict, paths, directory, save_hardware_file=True
  ):
      """Setup compatible environment from user paths. Creates the necessary datmo files if
      they are not already present
  
      Parameters
      ----------
      create_dict : dict
          dictionary for entity creation, this is mutated in the function (not returned)
      paths : list
          list of absolute or relative filepaths and/or dirpaths to collect with destination names
          (e.g. "/path/to/file>hello", "/path/to/file2", "/path/to/dir>newdir")
      directory : str
          path of directory to save additional files to
      save_hardware_file : bool
          boolean to save hardware file along with other files
          (default is True to save the file and create distinct hashes based on software and hardware)
  
      Returns
      -------
      paths : list
          returns the input paths with the paths of the new files created appended
      """
      # a. look for the default definition, if not present add it to the directory, and add it to paths
      if all(
          create_dict["definition_filename"] not in path
          for path in paths
      ):
          self.environment_driver.create_default_definition(directory)
          original_definition_filepath = os.path.join(
              directory, create_dict["definition_filename"]
          )
          paths.append(original_definition_filepath)
  
      # b. get the hardware info and save it to the entity, if save_hardware_file is True
      # then save it to file and add it to the paths
      create_dict[
          "hardware_info"
      ] = self.environment_driver.get_hardware_info()
      if save_hardware_file:
          hardware_info_filepath = os.path.join(
              directory, "hardware_info"
          )
          _ = JSONStore(
              hardware_info_filepath,
              initial_dict=create_dict["hardware_info"],
          )
          paths.append(hardware_info_filepath)
      return paths
  
imports: import os
  import shutil
  from datmo.core.controller.base import BaseController
  from datmo.core.controller.file.file_collection import FileCollectionController
  from datmo.core.entity.environment import Environment
  from datmo.core.util.i18n import get
  from datmo.core.util.validation import validate
  from datmo.core.util.spinner import Spinner
  from datmo.core.util.json_store import JSONStore
  from datmo.core.util.misc_functions import get_datmo_temp_path, list_all_filepaths
  from datmo.core.util.exceptions import PathDoesNotExist, RequiredArgumentMissing, TooManyArgumentsFound, EnvironmentNotInitialized, UnstagedChanges, ArgumentError, EnvironmentDoesNotExist, ProjectNotInitialized
label_desc: Use image node_id 18 for calling the EnvironmentController obj's underlying member method code with example usage: obj._setup_compatible_environment(create_dict, paths, directory, save_hardware_file) and returns: paths