code: def setup(self, **kwargs):
      self.environment_controller = EnvironmentController()
      environment_type = kwargs.get("type", None)
      environment_framework = kwargs.get("framework", None)
      environment_language = kwargs.get("language", None)
      # TODO: remove business logic from here and create common helper
      # environment types
      environment_types = (
          self.environment_controller.get_environment_types()
      )
      if (
          environment_types
          and environment_type not in environment_types
      ):
          environment_type = self.cli_helper.prompt_available_options(
              environment_types, option_type="type"
          )
      # environment frameworks
      available_framework_details = (
          self.environment_controller.get_supported_frameworks(
              environment_type
          )
      )
      available_frameworks = [
          item[0] for item in available_framework_details
      ]
      if (
          available_frameworks
          and environment_framework not in available_frameworks
      ):
          environment_framework = (
              self.cli_helper.prompt_available_options(
                  available_framework_details, option_type="framework"
              )
          )
      # environment languages
      available_environment_languages = (
          self.environment_controller.get_supported_languages(
              environment_type, environment_framework
          )
      )
      if (
          available_environment_languages
          and environment_language
          not in available_environment_languages
      ):
          environment_language = (
              self.cli_helper.prompt_available_options(
                  available_environment_languages,
                  option_type="language",
              )
          )
      try:
          options = {
              "environment_type": environment_type,
              "environment_framework": environment_framework,
              "environment_language": environment_language,
          }
          environment_obj = self.environment_controller.setup(
              options=options
          )
          self.cli_helper.echo(
              __(
                  "info",
                  "cli.environment.setup.success",
                  (environment_obj.name, environment_obj.id),
              )
          )
          return environment_obj
      except EnvironmentDoesNotExist:
          self.cli_helper.echo(
              __(
                  "error",
                  "cli.environment.setup.argument",
                  "%s:%s-%s"
                  % (
                      environment_framework,
                      environment_type,
                      environment_language,
                  ),
              )
          )
  
file_path: datmo/datmo/cli/command/environment.py
imports: from __future__ import print_function
  import os
  from datetime import datetime
  from datmo.core.util.i18n import get
  from datmo.cli.driver.helper import Helper
  from datmo.core.controller.environment.environment import EnvironmentController
  from datmo.cli.command.project import ProjectCommand
  from datmo.core.util.exceptions import EnvironmentDoesNotExist
  from datmo.core.util.misc_functions import printable_object, prettify_datetime
label_desc: Use image node_id 3 for calling the EnvironmentCommand obj's underlying member method code with example usage: obj.setup() and returns: environment_obj