def METHOD_NAME(self, scope, indices, batch=1000, timestamp=None):
    if timestamp is None:
        timestamp = int(time.time())
    arguments = [
        "SCAN",
        timestamp,
        self.namespace,
        self.bands,
        self.interval,
        self.retention,
        self.candidate_set_limit,
        scope,
    ]
    cursors = {idx: 0 for idx in indices}
    while cursors:
        requests = []
        for idx, cursor in cursors.items():
            requests.append([idx, cursor, batch])
        responses = self.__index(scope, arguments + flatten(requests))
        for (idx, _, _), (cursor, chunk) in zip(requests, responses):
            cursor = int(cursor)
            if cursor == 0:
                del cursors[idx]
            else:
                cursors[idx] = cursor
            yield idx, chunk