class_docstr: TaskController inherits from BaseController and manages business logic associated with tasks
  within the project.
  
  Attributes
  ----------
  environment : datmo.core.controller.environment.environment.EnvironmentController
      used to create environment if new definition file
  snapshot : datmo.core.controller.snapshot.SnapshotController
      used to create snapshots before and after tasks
  
  Methods
  -------
  create(dictionary)
      creates a Task object with the permanent parameters
  _run_helper(environment_id, log_filepath, options)
      helper for run to start environment and run with the appropriate parameters
  run(self, id, dictionary=None)
      runs the task and tracks the run, logs, inputs and outputs
  list(sort_key=None, sort_order=None)
      lists all tasks within the project given filters
  delete(id)
      deletes the specified task from the project
docstr: Run environment with parameters
  
  Parameters
  ----------
  environment_id : str
      the environment id for definition
  options : dict
      can include the following values:
  
      command : list
      ports : list
          Here are some example ports used for common applications.
             *  'jupyter notebook' - 8888
             *  flask API - 5000
             *  tensorboard - 6006
          An example input for the above would be ["8888:8888", "5000:5000", "6006:6006"]
          which maps the running host port (right) to that of the environment (left)
      name : str
      volumes : dict
      mem_limit : str
      workspace : str
      detach : bool
      stdin_open : bool
      tty : bool
  log_filepath : str
      absolute filepath to the log file
  
  Returns
  -------
  return_code : int
      system return code of the environment that was run
  run_id : str
      id of the environment run (different from environment id)
  logs : str
      output logs from the run
docstr_tok: ["Run","environment","with","parameters","Parameters","--","--","--","--","--","environment_id",":","str","the","environment","id","for","definition","options",":","dict","can","include","the","following","values",":","command",":","list","ports",":","list","Here","are","some","example","ports","used","for","common","applications",".","*","'jupyter","notebook","'","-","8888","*","flask","API","-","5000","*","tensorboard","-","6006","An","example","input","for","the","above","would","be","[","``","8888:8888","''",",","``","5000:5000","''",",","``","6006:6006","''","]","which","maps","the","running","host","port","(","right",")","to","that","of","the","environment","(","left",")","name",":","str","volumes",":","dict","mem_limit",":","str","workspace",":","str","detach",":","bool","stdin_open",":","bool","tty",":","bool","log_filepath",":","str","absolute","filepath","to","the","log","file","Returns","--","--","--","-","return_code",":","int","system","return","code","of","the","environment","that","was","run","run_id",":","str","id","of","the","environment","run","(","different","from","environment","id",")","logs",":","str","output","logs","from","the","run"]
code: def _run_helper(self, environment_id, options, log_filepath):
      """Run environment with parameters
  
      Parameters
      ----------
      environment_id : str
          the environment id for definition
      options : dict
          can include the following values:
  
          command : list
          ports : list
              Here are some example ports used for common applications.
                 *  'jupyter notebook' - 8888
                 *  flask API - 5000
                 *  tensorboard - 6006
              An example input for the above would be ["8888:8888", "5000:5000", "6006:6006"]
              which maps the running host port (right) to that of the environment (left)
          name : str
          volumes : dict
          mem_limit : str
          workspace : str
          detach : bool
          stdin_open : bool
          tty : bool
      log_filepath : str
          absolute filepath to the log file
  
      Returns
      -------
      return_code : int
          system return code of the environment that was run
      run_id : str
          id of the environment run (different from environment id)
      logs : str
          output logs from the run
      """
      # Run container with options provided
      run_options = {
          "command": options.get("command", None),
          "ports": options.get("ports", None),
          "name": options.get("name", None),
          "volumes": options.get("volumes", None),
          "mem_limit": options.get("mem_limit", None),
          "gpu": options.get("gpu", False),
          "detach": options.get("detach", False),
          "stdin_open": options.get("stdin_open", False),
          "tty": options.get("tty", False),
          "api": False,
      }
      workspace = options.get("workspace", None)
      self.environment.build(environment_id, workspace)
      # Start a daemon to run workspace on web browser
      name = options.get("name", None)
      if workspace is not None:
          thread = threading.Thread(
              target=self._open_workspace, args=(name, workspace)
          )
          thread.daemon = True  # Daemonize thread
          thread.start()  # Start the execution
  
      # Run container with environment
      return_code, run_id, logs = self.environment.run(
          environment_id, run_options, log_filepath
      )
  
      return return_code, run_id, logs
  
imports: import os
  import time
  import shlex
  import threading
  import webbrowser
  from datetime import datetime
  from datmo.core.controller.base import BaseController
  from datmo.core.controller.snapshot import SnapshotController
  from datmo.core.controller.environment.environment import EnvironmentController
  from datmo.core.entity.task import Task
  from datmo.core.util.validation import validate
  from datmo.core.util.spinner import Spinner
  from datmo.core.util.i18n import get
  from datmo.core.util.exceptions import TaskRunError, RequiredArgumentMissing, ProjectNotInitialized, PathDoesNotExist, TaskInteractiveDetachError, TooManyArgumentsFound, EntityNotFound, DoesNotExist, TaskNoCommandGiven
label_desc: Use image node_id 3 for calling the TaskController obj's underlying member method code with example usage: obj._run_helper(environment_id, options, log_filepath) and returns: return_code,  run_id,  logs