from pathlib import Path


def get_or_create_path(path_string, parents=True):
    """ Get path object from string, create if non-existing"""
    p = Path(path_string)
    if not p.exists():
        p.mkdir(parents=parents)
    return p