def foreach(self, argv, func):
        if len(argv) == 0:
            error("Command requires a search specifier.", 2)
        for item in argv:
            job = self.lookup(item)
            if job is None:
                error("Search job '%s' does not exist" % item, 2)
            func(job)
Verifies that the length of the given item is correct.
dataset/ETHPy150Open splunk/splunk-sdk-python/examples/job.py/Program.foreach--crossover with--dataset/ETHPy150Open shellderp/sublime-robot-plugin/lib/robot/libraries/BuiltIn.py/_Verify.length_should_be