def auto_set_versions(self, version):

        if self.attrib.get('version') == 'auto':
            self_or_empty = [self]
        else:
            self_or_empty = []
        for node in self.findall('.//*[@version="auto"]') + self_or_empty:
            node.attrib['version'] = '%d' % version
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/app_manager/remote_app.py/AutoSetVersions.auto_set_versions/original