def METHOD_NAME(pgf, sweep, trace):
    """
    Given a pgf node, a SweepRecord and TraceRecord this returns the
    corresponding `ChannelRecordStimulus` node as index.
    """
    stimRec = pgf[getStimulusRecordIndex(sweep)]
    for idx, channelRec in enumerate(stimRec):
        if channelRec.AdcChannel == trace.AdcChannel:
            return idx
    return None