def features_tags_parse_str_to_dict(obj):
features = obj['<STR_LIT>']<EOL>for i in tqdm(range(len(features))):<EOL><INDENT>tags = features[i]['<STR_LIT>'].get('<STR_LIT>')<EOL>if tags is not None:<EOL><INDENT>try:<EOL><INDENT>tags = json.loads("<STR_LIT:{>" + tags.replace("<STR_LIT>", "<STR_LIT::>") + "<STR_LIT:}>")<EOL><DEDENT>except:<EOL><INDENT>try:<EOL><INDENT>tags = eval("<STR_LIT:{>" + tags.replace("<STR_LIT>", "<STR_LIT::>") + "<STR_LIT:}>")<EOL><DEDENT>except:<EOL><INDENT>tags = None<EOL><DEDENT><DEDENT><DEDENT>if type(tags) == dict:<EOL><INDENT>features[i]['<STR_LIT>']['<STR_LIT>'] = {k:tags[k] for k in tags}<EOL><DEDENT>elif tags is None and '<STR_LIT>' in features[i]['<STR_LIT>']:<EOL><INDENT>del features[i]['<STR_LIT>']['<STR_LIT>']<EOL><DEDENT><DEDENT>return obj<EOL>
Parse tag strings of all features in the collection into a Python
dictionary, if possible.