def _gwf_channel_segments(path, channel, warn=True):
stream = open_gwf(path)<EOL>toc = stream.GetTOC()<EOL>secs = toc.GetGTimeS()<EOL>nano = toc.GetGTimeN()<EOL>dur = toc.GetDt()<EOL>readers = [getattr(stream, '<STR_LIT>'.format(type_.title())) for<EOL>type_ in ("<STR_LIT>", "<STR_LIT>", "<STR_LIT>")]<EOL>for i, (s, ns, dt) in enumerate(zip(secs, nano, dur)):<EOL><INDENT>for read in readers:<EOL><INDENT>try:<EOL><INDENT>read(i, channel)<EOL><DEDENT>except (IndexError, ValueError):<EOL><INDENT>continue<EOL><DEDENT>readers = [read]  <EOL>epoch = LIGOTimeGPS(s, ns)<EOL>yield Segment(epoch, epoch + dt)<EOL>break<EOL><DEDENT>else:  <EOL><INDENT>if warn:<EOL><INDENT>warnings.warn(<EOL>"<STR_LIT>".format(<EOL>channel, i, path),<EOL>)<EOL><DEDENT><DEDENT><DEDENT>
Yields the segments containing data for ``channel`` in this GWF path