def check_recursion_depth(self):
        """Check recursion depth, raise AsyncRecursionError if too deep."""
        from furious.async import MAX_DEPTH

        recursion_options = self._options.get('_recursion', {})
        max_depth = recursion_options.get('max', MAX_DEPTH)

        # Check if recursion check has been disabled, then check depth.
        if (max_depth != DISABLE_RECURSION_CHECK and
                self.recursion_depth > max_depth):
            raise errors.AsyncRecursionError('Max recursion depth reached.')
dataset/ETHPy150Open Workiva/furious/furious/async.py/Async.check_recursion_depth/original