import re


def _split_path(path):
    """Splits path into segments"""
    if isinstance(path, str):
        path = re.split("[./]", path)
    elif not isinstance(path, (list, tuple)):
        path = [path]
    return path