def _trailing(template, *targets):
    s = template
    for t in targets:
        n = s.find(t)
        if n == -1:
            raise ValueError("Target " + t + " not found in template.")
        s = s[n + len(t):]
    return s


# Filter the given state content record according to the given arg list.
@return: a C{list} of 2-tuples containing key/value pairs.
dataset/ETHPy150Open hvandenb/splunk-elasticsearch/search-elasticsearch/bin/splunklib/client.py/_trailing--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/persisted/dirdbm.py/DirDBM.items