def METHOD_NAME(filename):
    result = None
    with open(filename, encoding="ISO-8859-1", errors="ignore") as fp:
        data = fp.readlines()
        # Split data into smaller chunks, if first line appears more than one
        # Useful for plan.Trial files with more than one Trial
        first_line = data[0]
        indices = [i for i, line in enumerate(data) if line == first_line]
        for i, _ in enumerate(indices):
            next_index = -1
            if i + 1 < len(indices):
                next_index = indices[i + 1]
                # If there are multiple segments, return list, otherwise just the dict
                if not isinstance(result, list):
                    result = []
            split_data = data[indices[i] : next_index]
            if isinstance(result, list):
                d = yaml.safe_load(convert_to_yaml(split_data))
                result.append(d[list(d.keys())[0]])
            else:
                result = yaml.safe_load(convert_to_yaml(split_data))
    return result