parameters: (self)
return_statement: return (is_top_level, max_depth_reached)
docstring: Increase the depth in the recursion trace for this struct type.
  
          Returns:
          (is_top_level, max_depth_reached)
  
          If is_top_level is True, when decrease_recursion_depth is called
          the entry in the trace dictionary will be removed to indicate
          that this struct type is no longer being recursively generated.
  
          If max_depth_reached is True, the call to increase_recursion_depth
          has "failed" indicating that this randomizer is trying to generate
          a value that is too deep in the recursive tree and should return None.
          In this case, the recursion trace dictionary is not modified.
docstring_summary: Increase the depth in the recursion trace for this struct type.
docstring_tokens: Increase the depth in the recursion trace for this struct type .
function: def _increase_recursion_depth(self):
          """Increase the depth in the recursion trace for this struct type.
  
          Returns:
          (is_top_level, max_depth_reached)
  
          If is_top_level is True, when decrease_recursion_depth is called
          the entry in the trace dictionary will be removed to indicate
          that this struct type is no longer being recursively generated.
  
          If max_depth_reached is True, the call to increase_recursion_depth
          has "failed" indicating that this randomizer is trying to generate
          a value that is too deep in the recursive tree and should return None.
          In this case, the recursion trace dictionary is not modified.
          """
          trace = self.state.recursion_trace
          name = self.type_name
  
          if name in trace:
              # There is another struct of this type higher up in
              # the generation tree
              is_top_level = False
          else:
              is_top_level = True
              trace[name] = self.constraints['max_recursion_depth']
  
          depth = trace[name]
  
          if depth == 0:
              # Reached maximum depth
              if is_top_level:
                  del trace[name]
              max_depth_reached = True
          else:
              depth -= 1
              trace[name] = depth
              max_depth_reached = False
  
          return (is_top_level, max_depth_reached)
function_tokens: def _increase_recursion_depth ( self ) : trace = self . state . recursion_trace name = self . type_name if name in trace : # There is another struct of this type higher up in # the generation tree is_top_level = False else : is_top_level = True trace [ name ] = self . constraints [ 'max_recursion_depth' ] depth = trace [ name ] if depth == 0 : # Reached maximum depth if is_top_level : del trace [ name ] max_depth_reached = True else : depth -= 1 trace [ name ] = depth max_depth_reached = False return ( is_top_level , max_depth_reached )