import yaml


def load_from_yaml(path, verbose=False):
    """
    Load python object stored in yaml file.
    :param path: file path to load
    :param verbose:
    :return: loaded object
    """
    with open(path, 'r') as f:
        if verbose:
            print("Loading data from '" + path + "'")
        return yaml.load(f, Loader=yaml.CLoader)