def load_struct_from_yaml(filepath=None, text=None):
    if not (filepath or text) or (filepath and text):
        raise ValueError('Exactly one of filepath or text must be specified.')
    try:
        if filepath:
            with open(filepath) as fh:
                return yaml.load(fh)
        else:
            return yaml.load(text)
    except yaml.YAMLError as e:
        lineno = None
        if hasattr(e, 'problem_mark'):
            lineno = e.problem_mark.line  # pylint: disable=no-member
        raise LoadSyntaxError(e.message, filepath=filepath, lineno=lineno)
Parses a config structure from a .yaml file. The structure should be composed
dataset/ETHPy150Open ARM-software/workload-automation/wlauto/utils/misc.py/load_struct_from_yaml