"""Provide functions commonly used in this dataset."""

import yaml
from pathlib import Path
from ptpython.ipython import embed


def get_marker_names(dataset):
    """Get all defined marker names from dataset specific yaml files."""
    yaml_path = Path(__file__).parent / ".." / "yamls" / f"{dataset}.yaml"
    with open(yaml_path, "r") as stream:
        try:
            dict_yaml = yaml.safe_load(stream)
            return ["BOLD_" + x["name"] for x in dict_yaml["markers"]]
        except yaml.YAMLError as exc:
            print(exc)


if __name__ == "__main__":
    markers_piop1 = get_marker_names("PIOP1")

    embed()
