Create a List[int] parameter
        :param help_string:
        :param default:
        :return:
549981
def create_list_int(help_string=NO_HELP, default=NO_DEFAULT):
        # type: (str, Union[List[int], NO_DEFAULT_TYPE]) -> List[int]
        
        # noinspection PyTypeChecker
        return ParamFunctions(
            help_string=help_string,
            default=default,
            type_name="List[int]",
            function_s2t=convert_string_to_list_int,
            function_t2s=convert_list_int_to_string,
        )
1212317
def get_help_keys(self):
        
        help_keys = {}
        for k, v in self.help_context.items():
            if isinstance(v, tuple):
                help_keys[k] = v[0]
            else:
                help_keys[k] = v
        return help_keys
1138144
def make_default_short_help(help, max_length=45):
    """"""
    words = help.split()
    total_length = 0
    result = []
    done = False

    for word in words:
        if word[-1:] == '.':
            done = True
        new_length = result and 1 + len(word) or len(word)
        if total_length + new_length > max_length:
            result.append('...')
            done = True
        else:
            if result:
                result.append(' ')
            result.append(word)
        if done:
            break
        total_length += new_length

    return ''.join(result)
595850
def create_int(help_string=NO_HELP, default=NO_DEFAULT):
        # type: (str, Union[int, NO_DEFAULT_TYPE]) -> int
        
        # noinspection PyTypeChecker
        return ParamFunctions(
            help_string=help_string,
            default=default,
            type_name="int",
            function_s2t=convert_string_to_int,
            function_t2s=convert_int_to_string,
            function_s2t_generate_from_default=convert_string_to_int_default,
        )
1332471
def p_ParamList(p):
    '''
    
    '''
    if len(p) == 1:
        p[0] = ParamList(None, None)
    elif len(p) == 2:
        p[0] = ParamList(None, p[1])
    else:
        p[0] = ParamList(p[1], p[3])
900852
def common_cli_list_options(f):
    """"""

    @click.option(
        "-p",
        "--page",
        default=1,
        type=int,
        help="The page to view for lists, where 1 is the first page",
        callback=validators.validate_page,
    )
    @click.option(
        "-l",
        "--page-size",
        default=30,
        type=int,
        help="The amount of items to view per page for lists.",
        callback=validators.validate_page_size,
    )
    @click.pass_context
    @functools.wraps(f)
    def wrapper(ctx, *args, **kwargs):
        # pylint: disable=missing-docstring
        opts = config.get_or_create_options(ctx)
        kwargs["opts"] = opts
        return ctx.invoke(f, *args, **kwargs)

    return wrapper
216189
def help_function(self, command=None):
        
        if command:
            return self.registered[command].get(
                'description', 'No help available'
            )
        return ', '.join(sorted(self.registered))
821970
def get_params_and_defaults(param_list, db):
    
    return [[p, d] for p, d in db.get_all_values_of_all_params().items()]
1132759
def _call_atfork_list(call_list):
    
    exception_list = []
    for func in call_list:
        try:
            func()
        except:
            exception_list.append(sys.exc_info())
    return exception_list
77314
def create_enum_subset(enum_type, help_string=NO_HELP, default=NO_DEFAULT):
        # type: (Type[Enum], str, EnumSubset) -> EnumSubset
        
        # noinspection PyTypeChecker
        return ParamEnumSubset(
            help_string=help_string,
            default=default,
            enum_type=enum_type,
        )
694407
def _return_comma_list(self, l):
        
        if isinstance(l, (text_type, int)):
            return l

        if not isinstance(l, list):
            raise TypeError(l, ' should be a list of integers, \
not {0}'.format(type(l)))

        str_ids = ','.join(str(i) for i in l)

        return str_ids
133747
def create_single(cls, value, idx='default'):
        

        return LabelList(idx=idx, labels=[
            Label(value=value)
        ])
834428
def to_help(self):
        
        result = []
        result.append(self.classname)
        result.append("=" * len(self.classname))
        result.append("")
        result.append("DESCRIPTION")
        result.append("")
        result.append(self.global_info())
        result.append("")
        result.append("OPTIONS")
        result.append("")
        options = javabridge.call(self.jobject, "listOptions", "()Ljava/util/Enumeration;")
        enum = javabridge.get_enumeration_wrapper(options)
        while enum.hasMoreElements():
            opt = Option(enum.nextElement())
            result.append(opt.synopsis)
            result.append(opt.description)
            result.append("")
        return '\n'.join(result)
1302788
def create_existing_file(help_string=NO_HELP, default=NO_DEFAULT, suffixes=None):
        # type: (str, Union[str, NO_DEFAULT_TYPE], Union[List[str], None]) -> str
        
        # noinspection PyTypeChecker
        return ParamFilename(
            help_string=help_string,
            default=default,
            type_name="existing_file",
            suffixes=suffixes,
        )
399605
def strnumlist(prefix: str, numbers: List[int], suffix: str = "") -> List[str]:
    
    return ["{}{}{}".format(prefix, num, suffix) for num in numbers]
568201
def do_help(self, arg):
        
        cmds = arg.split()

        if cmds:
            func = getattr(self, 'do_{}'.format(cmds[0]))
            if func:
                _LOGGING.info(func.__doc__)
            else:
                _LOGGING.error('Command %s not found', cmds[0])
        else:
            _LOGGING.info("Available command list: ")
            for curr_cmd in dir(self.__class__):
                if curr_cmd.startswith("do_") and not curr_cmd == 'do_test':
                    print(" - ", curr_cmd[3:])
            _LOGGING.info("For help with a command type `help command`")
483235
def target_str_to_list(target_str):
    
    new_list = list()
    for target in target_str.split(','):
        target = target.strip()
        target_list = target_to_list(target)
        if target_list:
            new_list.extend(target_list)
        else:
            LOGGER.info("{0}: Invalid target value".format(target))
            return None
    return list(collections.OrderedDict.fromkeys(new_list))