code: def test_run(self):
      # Test run simple command with simple Dockerfile
      self.project_controller.init("test5", "test description")
      self.environment_controller = EnvironmentController()
  
      # 0) Test option 0
      # Create environment definition in project environment directory
      definition_filepath = os.path.join(
          self.environment_controller.environment_driver.environment_directory_path,
          "Dockerfile",
      )
      random_text = str(uuid.uuid1())
      with open(definition_filepath, "wb") as f:
          f.write(to_bytes("FROM python:3.5-alpine" + os.linesep))
          f.write(to_bytes(str("RUN echo " + random_text)))
  
      random_name = str(uuid.uuid1())
      run_options = {
          "command": ["sh", "-c", "echo yo"],
          "ports": ["8888:8888"],
          "name": random_name,
          "volumes": None,
          "detach": True,
          "stdin_open": False,
          "mem_limit": "4g",
          "tty": False,
          "api": False,
      }
  
      # Create environment in the project
      environment_obj = self.environment_controller.create({})
      self.environment_ids.append(environment_obj.id)
      log_filepath = os.path.join(
          self.project_controller.home, "task.log"
      )
  
      # Build environment in the project
      _ = self.environment_controller.build(environment_obj.id)
  
      # Run environment in the project
      return_code, run_id, logs = self.environment_controller.run(
          environment_obj.id, run_options, log_filepath
      )
  
      assert return_code == 0
      assert run_id
      assert logs
      # remove Dockerfile
      os.remove(
          os.path.join(
              self.environment_controller.environment_driver.environment_directory_path,
              "Dockerfile",
          )
      )
  
      # 1) Test option 1
      # Create environment definition
      definition_filepath = os.path.join(
          self.environment_controller.home, "Dockerfile"
      )
      random_text = str(uuid.uuid1())
      with open(definition_filepath, "wb") as f:
          f.write(to_bytes("FROM python:3.5-alpine" + os.linesep))
          f.write(to_bytes(str("RUN echo " + random_text)))
  
      random_name = str(uuid.uuid1())
      run_options = {
          "command": ["sh", "-c", "echo yo"],
          "ports": ["8889:8889"],
          "name": random_name,
          "volumes": None,
          "mem_limit": "4g",
          "detach": True,
          "stdin_open": False,
          "tty": False,
          "api": False,
      }
  
      input_dict = {
          "paths": [definition_filepath],
      }
  
      # Create environment in the project
      environment_obj = self.environment_controller.create(input_dict)
      self.environment_ids.append(environment_obj.id)
      log_filepath = os.path.join(
          self.project_controller.home, "task.log"
      )
  
      # Build environment in the project
      _ = self.environment_controller.build(environment_obj.id)
  
      # Run environment in the project
      return_code, run_id, logs = self.environment_controller.run(
          environment_obj.id, run_options, log_filepath
      )
  
      assert return_code == 0
      assert run_id
      assert logs
  
      # 2) Test option 2
      os.remove(definition_filepath)
  
      # Create script to test
      test_filepath = os.path.join(
          self.environment_controller.home, "script.py"
      )
      with open(test_filepath, "wb") as f:
          f.write(to_bytes("import os\n"))
          f.write(to_bytes("import sys\n"))
          f.write(to_bytes("print('hello')\n"))
  
      # Create environment in the project
      environment_obj = self.environment_controller.create({})
      self.environment_ids.append(environment_obj.id)
      self.environment_controller.build(environment_obj.id)
  
      random_name = str(uuid.uuid1())
      run_options = {
          "command": ["sh", "-c", "echo yo"],
          "ports": ["8899:8899"],
          "name": random_name,
          "volumes": {
              self.environment_controller.home: {
                  "bind": "/home/",
                  "mode": "rw",
              }
          },
          "mem_limit": "4g",
          "detach": False,
          "stdin_open": False,
          "tty": False,
          "api": False,
      }
  
      # Run environment in the project
      return_code, run_id, logs = self.environment_controller.run(
          environment_obj.id, run_options, log_filepath
      )
  
      assert return_code == 0
      assert run_id
      assert logs
  
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 13 for calling the TestEnvironmentController obj's underlying member method code with example usage: obj.test_run() without return types