def _extract_last_value_from_string_argument(argument_string: str) -> str:
    """
    Internal function for argument string cleanup.

    Parameters
    ----------
    argument_string
        A string representing an argument to a function.
        Can be a string containing a list/tuple/set.

    Returns
    -------
    last_argument - string
        A clean string (no brackets, quotation marks) of the last value in iterable argument or the argument.
    """

    # we can't have trailing spaces because we will not receive them from IPython
    # (since it always gives us string util tab)
    def _remove_unwanted_chars(string):
        if not string:
            return ''

        for i, char in enumerate(string):
            if char in r'\'\"[]()':
                continue
            else:
                return string[i:]
        return string

    if argument_string is None:
        return ''

    argument_string = argument_string.strip('"').strip("'").strip()

    # we accept string which represent a list/tuple/set argument
    if argument_string and argument_string[0] in ['[', '(']:
        # if only a bracket - there is no value
        if len(argument_string) == 1:
            return ''

        # we want the last value from the list
        return _remove_unwanted_chars(argument_string.split(',')[-1].strip())
    return _remove_unwanted_chars(argument_string)