docstr: Prompt user to choose an available environment. Returns the environment name
docstr_tok: ["Prompt","user","to","choose","an","available","environment",".","Returns","the","environment","name"]
code: def prompt_available_options(self, available_options, option_type):
      """Prompt user to choose an available environment. Returns the environment name"""
      # If there are no options
      if not available_options:
          return None
      # If there exists list of options
      if option_type == "framework":
          available_options_info = available_options
          available_options = []
          for idx, option in enumerate(available_options_info):
              available_options.append(option[0])
              self.echo(
                  "(%s) %s : %s" % (idx + 1, option[0], option[1])
              )
      else:
          for idx, option in enumerate(available_options):
              self.echo("(%s) %s" % (idx + 1, option))
      input_environment_option = self.prompt(
          __("prompt", "cli.environment.setup.%s" % option_type)
      )
      option_environment_index = None
      valid_option = False
      while input_environment_option is not None and not valid_option:
          # exit when user wants to quit
          if input_environment_option in ["q", "quit"]:
              sys.exit(0)
          try:
              option_environment_index = int(input_environment_option)
              if 0 < option_environment_index <= len(available_options):
                  valid_option = True
              else:
                  raise ValueError
          except ValueError:
              try:
                  option_environment_index = (
                      available_options.index(input_environment_option)
                      + 1
                  )
                  valid_option = True
              except ValueError:
                  self.echo(
                      __(
                          "warn",
                          "cli.environment.setup.argument.unavailable.%s"
                          % option_type,
                          input_environment_option,
                      )
                  )
                  input_environment_option = self.prompt(
                      __(
                          "prompt",
                          "cli.environment.setup.%s" % option_type,
                      )
                  )
      if option_environment_index is not None:
          input_environment_option = available_options[
              option_environment_index - 1
          ]
  
      if (
          input_environment_option is None
          or option_environment_index <= 0
          or option_environment_index > len(available_options)
      ):
          self.echo(
              __(
                  "warn",
                  "cli.environment.setup.argument.%s" % option_type,
              )
          )
          if option_type == "type":
              input_environment_option = "cpu"
          elif option_type == "framework":
              input_environment_option = "python-base"
          elif option_type == "language":
              input_environment_option = "py27"
  
      return input_environment_option
  
imports: from __future__ import print_function
  from future import standard_library
  from builtins import input
  import os
  import sys
  import importlib
  import inspect
  import prettytable
  from io import open
  from datmo.core.util.i18n import get
  from datmo.core.util.exceptions import ArgumentError, ProjectNotInitialized
  from datmo.core.util.misc_functions import check_docker_inactive
label_desc: Use image node_id 10 for calling the Helper obj's underlying member method code with example usage: obj.prompt_available_options(available_options, option_type) and returns: input_environment_option, None