def _get_ctx(i, ctx_list):
    """Returns execution context associated with a run.
    
    """
    for ctx in ctx_list:
        if i.run_type == ctx.run_type and i.run_index == ctx.run_index:
            return ctx