code: def test_stop_success(self):
      # TODO: test more run options
      # 1) Test run_id input to stop
      # 2) Test match_string input to stop
      # 3) Test all input to stop
      # 4) Test if the image was removed by stop
      self.project_controller.init("test5", "test description")
      self.environment_controller = EnvironmentController()
  
      # Create environment definition
      definition_filepath = os.path.join(
          self.environment_controller.home, "Dockerfile"
      )
      with open(definition_filepath, "wb") as f:
          f.write(to_bytes("FROM python:3.5-alpine"))
  
      run_options = {
          "command": ["sh", "-c", "echo yo"],
          "ports": ["8888:8888"],
          "name": "datmo-task-"
          + self.environment_controller.model.id
          + "-"
          + "test",
          "volumes": None,
          "mem_limit": "4g",
          "detach": False,
          "stdin_open": False,
          "tty": False,
          "api": False,
      }
  
      # Create environment definition
      env_def_path = os.path.join(
          self.project_controller.home, "Dockerfile"
      )
      random_text = str(uuid.uuid1())
      with open(env_def_path, "wb") as f:
          f.write(to_bytes("FROM python:3.5-alpine" + os.linesep))
          f.write(to_bytes(str("RUN echo " + random_text)))
  
      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)
  
      # 1) Test option 1
  
      _, run_id, _ = self.environment_controller.run(
          environment_obj.id, run_options, log_filepath
      )
      return_code = self.environment_controller.stop(run_id=run_id)
  
      assert return_code
  
      # 2) Test option 2
  
      # Rebuild environment in the project
      _ = self.environment_controller.build(environment_obj.id)
  
      _, _, _ = self.environment_controller.run(
          environment_obj.id, run_options, log_filepath
      )
      return_code = self.environment_controller.stop(
          match_string="datmo-task-"
          + self.environment_controller.model.id
      )
  
      assert return_code
  
      # 3) Test option 3
  
      # Rebuild environment in the project
      _ = self.environment_controller.build(environment_obj.id)
      _, _, _ = self.environment_controller.run(
          environment_obj.id, run_options, log_filepath
      )
      run_options_2 = {
          "command": ["sh", "-c", "echo yo"],
          "ports": ["8889:8889"],
          "name": "datmo-task-"
          + self.environment_controller.model.id
          + "-"
          + "test2",
          "volumes": None,
          "mem_limit": "4g",
          "detach": False,
          "stdin_open": False,
          "tty": False,
          "api": False,
      }
      _, _, _ = self.environment_controller.run(
          environment_obj.id, run_options_2, log_filepath
      )
      return_code = self.environment_controller.stop(all=True)
  
      assert return_code
  
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 19 for calling the TestEnvironmentController obj's underlying member method code with example usage: obj.test_stop_success() without return types