// determine if .dat file exists where it should
error_msg = f"The data path you specified " \
f"does not exist for the lay path, {lay_fname}"
if op.isabs(dat_path) and not op.exists(dat_fname):
raise FileNotFoundError(error_msg)
if not op.exists(dat_fpath):
raise FileNotFoundError(error_msg)
fileinfo_dict[key] = val
// ChannelMap
After Change
patient_dict[key] = val
// Comments (turned into mne.Annotations)
elif section == "comments":
comments_dict[key] = comments_dict.get(key, list()) + [val]
num_comments += 1
// get numerical metadata