code: def test_run_stop_success(self):
      # 1) Test stop with task_id
      # 2) Test stop with all
      self.__set_variables()
  
      test_command = ["sh", "-c", "echo yo"]
      test_ports = "8888:8888"
      test_mem_limit = "4g"
      test_dockerfile = os.path.join(self.temp_dir, "Dockerfile")
  
      self.run_command.parse(
          [
              "run",
              "--ports",
              test_ports,
              "--environment-paths",
              test_dockerfile,
              "--mem-limit",
              test_mem_limit,
              test_command,
          ]
      )
  
      test_run_obj = self.run_command.execute()
  
      # 1) Test option 1
      self.run_command.parse(["stop", "--id", test_run_obj.id])
  
      # test for desired side effects
      assert self.run_command.args.id == test_run_obj.id
  
      # test when task id is passed to stop it
      run_stop_command = self.run_command.execute()
      assert run_stop_command == True
  
      # 2) Test option 2
      self.run_command.parse(["stop", "--all"])
  
      # test when all is passed to stop all
      run_stop_command = self.run_command.execute()
      assert run_stop_command == True
  
imports: from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import os
  import glob
  import time
  import tempfile
  import platform
  from argparse import ArgumentError
  from io import open
  from datmo.config import Config
  from datmo.cli.driver.helper import Helper
  from datmo.cli.command.project import ProjectCommand
  from datmo.cli.command.run import RunCommand
  from datmo.core.entity.run import Run
  from datmo.core.util.exceptions import DoesNotExist, MutuallyExclusiveArguments, RequiredArgumentMissing
  from datmo.core.util.misc_functions import pytest_docker_environment_failed_instantiation
label_desc: Use image node_id 12 for calling the TestRunCommand obj's underlying member method code with example usage: obj.test_run_stop_success() without return types