@staticmethod<EOL><INDENT>def convert_scope_string_to_expression(scope):<DEDENT>
<EOL>if scope is None or not scope:<EOL><INDENT>return [True, []]<EOL><DEDENT>expressions = []<EOL>string_expressions = scope.strip('<STR_LIT>').split('<STR_LIT>')<EOL>expression_re = re.compile('<STR_LIT>')<EOL>for string_expression in string_expressions:<EOL><INDENT>matches = expression_re.match(string_expression)<EOL>if matches is None:<EOL><INDENT>return [False, '<STR_LIT>']<EOL><DEDENT>is_not_operator = matches.group('<STR_LIT>') is not None<EOL>if matches.group('<STR_LIT>') == '<STR_LIT>':<EOL><INDENT>list_value = matches.group('<STR_LIT:value>').strip('<STR_LIT>')<EOL>value_matches = re.findall('<STR_LIT>', list_value)<EOL>if len(value_matches) == <NUM_LIT:0>:<EOL><INDENT>return [False, '<STR_LIT>']<EOL><DEDENT>value_matches = map(lambda v: v[<NUM_LIT:0>] if v[<NUM_LIT:0>] else v[<NUM_LIT:1>], value_matches)<EOL>values = map(lambda v: v.strip('<STR_LIT>'), value_matches)<EOL><DEDENT>else:<EOL><INDENT>values = [matches.group('<STR_LIT:value>').strip('<STR_LIT>')]<EOL><DEDENT>operator_parse_dict = {<EOL>'<STR_LIT>': '<STR_LIT>' if not is_not_operator else '<STR_LIT>',<EOL>'<STR_LIT:=>': '<STR_LIT>' if not is_not_operator else '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>' if not is_not_operator else '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>' if not is_not_operator else '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>'<EOL>}<EOL>operator = operator_parse_dict.get(matches.group('<STR_LIT>'), None)<EOL>if operator is None:<EOL><INDENT>return [False, '<STR_LIT>']<EOL><DEDENT>expressions.append({<EOL>'<STR_LIT>': matches.group('<STR_LIT>'),<EOL>'<STR_LIT>': operator,<EOL>'<STR_LIT:value>': values<EOL>})<EOL><DEDENT>return [True, expressions]<EOL>
**Description**
            Internal function to convert a filter string to a filter object to be used with dashboards.