pullOptionsCells[file_] :=
Module[{nb = NotebookTools`FlattenCellGroups@Get@file},
FirstCase[nb,
{
___,
Cell[_?(MemberQ[#, "Options", \[Infinity]] &),
"ExampleSection", ___],
args___,
Cell[_, "ExampleSection" | "SeeAlsoSection", ___],
___
} :> {args},
None,
\[Infinity]
]
]