import pathlib


def find_containers(path):
    """Builds container list from experiment absolute path

    Parameters
    ----------
    path : str, or pathlib.Path

    Returns
    -------
    containers : list of pathlib.Path
        paths to containers
    """
    if not isinstance(path, pathlib.Path):
        path = pathlib.Path(path).expanduser().absolute()
    containers = [item for item in path.glob('xy*') if item.is_dir()]
    return containers