code: def test_create(self):
      # 0) Test SUCCESS create when definition path exists in project environment directory (no input, no root) -- with hardware file
      # 1) Test SUCCESS create when definition path exists in project environment directory (no input, no root)
      # 5) Test SUCCESS when definition path exists in project environment directory and passed from input dict (takes input)
      # 2) Test SUCCESS create when definition path exists in root project folder (no input, no project environment dir)
      # 3) Test SUCCESS create when definition path is passed into input dict (takes input, no project environment dir)
      # 4) Test SUCCESS create when definition path is passed into input dict along with expected filename to be saved
      # 6) Test FAIL when passing same filepath with same filename into input dict
  
      self.__setup()
  
      input_dict_0 = {"name": "test", "description": "test description"}
  
      # 0) Test option 0 (cannot test hash because hardware is machine-dependent)
      environment_obj_0 = self.environment_controller.create(
          input_dict_0
      )
      self.environment_ids.append(environment_obj_0.id)
      assert environment_obj_0
      assert isinstance(environment_obj_0, Environment)
      assert environment_obj_0.id
      assert environment_obj_0.driver_type == "docker"
      assert environment_obj_0.file_collection_id
      assert environment_obj_0.definition_filename
      assert environment_obj_0.hardware_info
      assert environment_obj_0.unique_hash
      assert environment_obj_0.name == "test"
      assert environment_obj_0.description == "test description"
  
      # Get file collection path
      file_collection_obj = (
          self.environment_controller.dal.file_collection.get_by_id(
              environment_obj_0.file_collection_id
          )
      )
      file_collection_dir = (
          self.environment_controller.file_driver.get_collection_path(
              file_collection_obj.filehash
          )
      )
      assert os.path.isfile(os.path.join(file_collection_dir, "test"))
      assert os.path.isfile(
          os.path.join(file_collection_dir, "Dockerfile")
      )
      output = open(
          os.path.join(file_collection_dir, "Dockerfile"), "r"
      ).read()
      print(repr(output))
      assert os.path.isfile(
          os.path.join(file_collection_dir, "hardware_info")
      )
      output = open(
          os.path.join(file_collection_dir, "hardware_info"), "r"
      ).read()
      print(repr(output))
  
      # 1) Test option 1
      environment_obj_0 = self.environment_controller.create(
          input_dict_0, save_hardware_file=False
      )
      self.environment_ids.append(environment_obj_0.id)
      assert environment_obj_0
      assert isinstance(environment_obj_0, Environment)
      assert environment_obj_0.id
      assert environment_obj_0.driver_type == "docker"
      assert environment_obj_0.file_collection_id
      assert environment_obj_0.definition_filename
      assert environment_obj_0.hardware_info
      # Get file collection path
      file_collection_obj = (
          self.environment_controller.dal.file_collection.get_by_id(
              environment_obj_0.file_collection_id
          )
      )
      file_collection_dir = (
          self.environment_controller.file_driver.get_collection_path(
              file_collection_obj.filehash
          )
      )
      assert os.path.isfile(os.path.join(file_collection_dir, "test"))
      assert os.path.isfile(
          os.path.join(file_collection_dir, "Dockerfile")
      )
      output = open(
          os.path.join(file_collection_dir, "Dockerfile"), "r"
      ).read()
      print(repr(output))
      assert (
          environment_obj_0.unique_hash
          == "1e32ff083520f792cbe4bafdc2de2a01"
      )
      assert environment_obj_0.name == "test"
      assert environment_obj_0.description == "test description"
      # Files ["test", "Dockerfile"]
  
      # 5) Test option 5
      input_dict_1 = {
          "name": "test",
          "description": "test description",
          "paths": [self.definition_filepath],
      }
  
      environment_obj = self.environment_controller.create(
          input_dict_1, save_hardware_file=False
      )
      self.environment_ids.append(environment_obj.id)
      assert environment_obj
      assert isinstance(environment_obj, Environment)
      assert environment_obj.id
      assert environment_obj.driver_type == "docker"
      assert environment_obj.file_collection_id
      assert environment_obj.definition_filename
      assert environment_obj.hardware_info
      # Get file collection path
      file_collection_obj = (
          self.environment_controller.dal.file_collection.get_by_id(
              environment_obj.file_collection_id
          )
      )
      file_collection_dir = (
          self.environment_controller.file_driver.get_collection_path(
              file_collection_obj.filehash
          )
      )
      assert os.path.isfile(
          os.path.join(file_collection_dir, "Dockerfile")
      )
      output = open(
          os.path.join(file_collection_dir, "Dockerfile"), "r"
      ).read()
      print(repr(output))
      assert not os.path.isfile(
          os.path.join(file_collection_dir, "datmoDockerfile")
      )
      print(repr(output))
      assert (
          environment_obj.unique_hash
          == "fd725be022ce93f870c81e2ee170189c"
      )
      assert environment_obj.name == "test"
      assert environment_obj.description == "test description"
      # Files ["Dockerfile"]
  
      # remove the project environment directory
      os.remove(
          os.path.join(
              self.environment_controller.environment_driver.environment_directory_path,
              "Dockerfile",
          )
      )
      os.remove(
          os.path.join(
              self.environment_controller.environment_driver.environment_directory_path,
              "test",
          )
      )
  
      # Create environment definition in root directory
      home_definition_filepath = os.path.join(
          self.environment_controller.home, "Dockerfile"
      )
      with open(home_definition_filepath, "wb") as f:
          f.write(to_bytes("FROM python:3.5-alpine"))
  
      # 2) Test option 2
      environment_obj_1 = self.environment_controller.create(
          input_dict_0, save_hardware_file=False
      )
      self.environment_ids.append(environment_obj_1.id)
      assert environment_obj_1
      assert isinstance(environment_obj_1, Environment)
      assert environment_obj_1.id
      assert environment_obj_1.driver_type == "docker"
      assert environment_obj_1.file_collection_id
      assert environment_obj_1.definition_filename
      assert environment_obj_1.hardware_info
      assert (
          environment_obj_1.unique_hash == file_collection_obj.filehash
      )
      # Get file collection path
      file_collection_obj = (
          self.environment_controller.dal.file_collection.get_by_id(
              environment_obj_1.file_collection_id
          )
      )
      file_collection_dir = (
          self.environment_controller.file_driver.get_collection_path(
              file_collection_obj.filehash
          )
      )
      assert environment_obj_1.name == "test"
      assert environment_obj_1.description == "test description"
      assert os.path.isfile(
          os.path.join(file_collection_dir, "Dockerfile")
      )
      assert (
          environment_obj_1.unique_hash
          == "fd725be022ce93f870c81e2ee170189c"
      )
  
      # 3) Test option 3
      input_dict_2 = {
          "name": "test",
          "description": "test description",
          "paths": [home_definition_filepath],
      }
  
      # Create environment in the project
      environment_obj_2 = self.environment_controller.create(
          input_dict_2, save_hardware_file=False
      )
      self.environment_ids.append(environment_obj_2.id)
      assert environment_obj_2
      assert isinstance(environment_obj_2, Environment)
      assert environment_obj_2.id
      assert environment_obj_2.driver_type == "docker"
      assert environment_obj_2.file_collection_id
      assert environment_obj_2.definition_filename
      assert environment_obj_2.hardware_info
      assert (
          environment_obj_2.unique_hash == file_collection_obj.filehash
      )
      # Get file collection path
      file_collection_obj = (
          self.environment_controller.dal.file_collection.get_by_id(
              environment_obj_2.file_collection_id
          )
      )
      file_collection_dir = (
          self.environment_controller.file_driver.get_collection_path(
              file_collection_obj.filehash
          )
      )
      assert environment_obj_2.name == "test"
      assert environment_obj_2.description == "test description"
      assert os.path.isfile(
          os.path.join(file_collection_dir, "Dockerfile")
      )
      assert (
          environment_obj_2.unique_hash
          == "fd725be022ce93f870c81e2ee170189c"
      )
  
      # 4) Test option 4
      input_dict_3 = {
          "paths": [home_definition_filepath + ">Dockerfile"],
      }
  
      # Create environment in the project
      environment_obj_3 = self.environment_controller.create(
          input_dict_3, save_hardware_file=False
      )
      self.environment_ids.append(environment_obj_3.id)
      assert environment_obj_3
      assert isinstance(environment_obj_3, Environment)
      assert environment_obj_3.id
      assert environment_obj_3.driver_type == "docker"
      assert environment_obj_3.file_collection_id
      assert environment_obj_3.definition_filename
      assert environment_obj_3.hardware_info
      assert (
          environment_obj_3.unique_hash == file_collection_obj.filehash
      )
      # Get file collection path
      file_collection_obj = (
          self.environment_controller.dal.file_collection.get_by_id(
              environment_obj_3.file_collection_id
          )
      )
      file_collection_dir = (
          self.environment_controller.file_driver.get_collection_path(
              file_collection_obj.filehash
          )
      )
      assert environment_obj_3.name == "test"
      assert environment_obj_3.description == "test description"
      assert os.path.isfile(
          os.path.join(file_collection_dir, "Dockerfile")
      )
      assert (
          environment_obj_3.unique_hash
          == "fd725be022ce93f870c81e2ee170189c"
      )
  
      # 6) Test option 6
      definition_filepath = os.path.join(
          self.environment_controller.home, "Dockerfile"
      )
  
      input_dict = {
          "paths": [
              definition_filepath + ">Dockerfile",
              definition_filepath + ">Dockerfile",
          ],
      }
  
      # Create environment in the project
      failed = False
      try:
          _ = self.environment_controller.create(
              input_dict, save_hardware_file=False
          )
      except FileAlreadyExistsError:
          failed = True
  
      assert failed
  
imports: import os
  import uuid
  import threading
  import tempfile
  import platform
  import timeout_decorator
  from io import open
  from datmo.config import Config
  from datmo.core.controller.project import ProjectController
  from datmo.core.controller.environment.environment import EnvironmentController
  from datmo.core.entity.environment import Environment
  from datmo.core.util.exceptions import EntityNotFound, RequiredArgumentMissing, TooManyArgumentsFound, FileAlreadyExistsError, UnstagedChanges, EnvironmentDoesNotExist, ProjectNotInitialized
  from datmo.core.util.misc_functions import check_docker_inactive, pytest_docker_environment_failed_instantiation
label_desc: Use image node_id 10 for calling the TestEnvironmentController obj's underlying member method code with example usage: obj.test_create() without return types