### Summary

Please add more filters based on os.path, specifically: `os.path.commonpath`, `os.path.normpath`. It is cheap, but would be handy in such tasks as validation, archive management, programmatic path generation. Can replace a lot of loops and regex filters.

### Issue Type

Feature Idea

### Component Name

core

### Additional Information

none

### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
return to_text(base64.b64encode(to_bytes(string, encoding=encoding, errors='surrogate_or_strict')))
def b64decode(string, encoding='utf-8'):
    return to_text(base64.b64decode(to_bytes(string, errors='surrogate_or_strict')), encoding=encoding)
def flatten(mylist, levels=None, skip_nulls=True):
    ret = []
    for element in mylist:
        if skip_nulls and element in (None, 'None', 'null'):
            
            continue
        elif is_sequence(element):
            if levels is None:
                ret.extend(flatten(element, skip_nulls=skip_nulls))
            elif levels >= 1:
                
                ret.extend(flatten(element, levels=(int(levels) - 1), skip_nulls=skip_nulls))
            else:
                ret.append(element)
        else:
            ret.append(element)
    return ret
def subelements(obj, subelements, skip_missing=False):