def get_scope_completion(view, rules, skip_sel_check=False):

    scopes = None
    if rules is not None:
        scopes = ','.join(rules.get('scan_completion_scopes', []))
        sels = view.sel()
        if not skip_sel_check:
            if len(sels) == 0 or not scopes or view.score_selector(sels[0].begin(), scopes) == 0:
                scopes = None
    return scopes
Remove colors from the output (no escape sequences)
dataset/ETHPy150Open facelessuser/ColorHelper/color_helper_util.py/get_scope_completion--crossover with--dataset/ETHPy150Open androguard/androguard/androguard/core/androconf.py/remove_colors