def set_recursion_limit(self):
        if 'RECURSION_LIMIT' in os.environ:
            try:
                limit = int(os.environ['RECURSION_LIMIT'])
            except TypeError:
                log.warning('Unable to parse RECURSION_LIMIT "{}"'.format(
                    os.environ['RECURSION_LIMIT']))
            else:
                sys.setrecursionlimit(limit)
                log.info('Set RECURSION_LIMIT to {}'.format(limit))
Set explicit recursion limit if set in the environment.
dataset/ETHPy150Open mozilla/addons-server/src/olympia/core/apps.py/CoreConfig.set_recursion_limit