def METHOD_NAME(det, motor):
    yield Msg('open_run')
    yield Msg('declare_stream', None, motor, det, name='primary')
    for i in range(-5, 5):
        yield Msg('create', name='primary')
        yield Msg('set', motor, i)
        yield Msg('trigger', det)
        yield Msg('read', motor)
        yield Msg('read', det)
        yield Msg('save')
    yield Msg('close_run')