class_docstr: Lowers return statements into variables and conditionals.
  
  Specifically, the following pattern:
  
      <block 1>
      return val
      <block 2>
  
  is converted to:
  
      do_return = False
      retval = None
  
      <block 1>
  
      do_return = True
      retval = val
  
      if not do_return:
        <block 2>
  
      return retval
  
  The conversion adjusts loops as well:
  
      <block 1>
      while cond:
        <block 2>
        return retval
  
  is converted to:
  
      <block 1>
      while not do_return and cond:
        <block 2>
        do_return = True
        retval = val
class_docstr_tok: ["Lowers","return","statements","into","variables","and","conditionals",".","Specifically",",","the","following","pattern",":","<","block","1",">","return","val","<","block","2",">","is","converted","to",":","do_return","=","False","retval","=","None","<","block","1",">","do_return","=","True","retval","=","val","if","not","do_return",":","<","block","2",">","return","retval","The","conversion","adjusts","loops","as","well",":","<","block","1",">","while","cond",":","<","block","2",">","return","retval","is","converted","to",":","<","block","1",">","while","not","do_return","and","cond",":","<","block","2",">","do_return","=","True","retval","=","val"]
code: def visit_While(self, node):
      node.test = self.visit(node.test)
  
      # Add the check for return to the loop condition.
      node.body = self._visit_statement_block(node, node.body)
      if self.state[_Block].return_used:
          node.test = templates.replace_as_expression(
              "not control_var and test",
              test=node.test,
              control_var=self.state[_Function].do_return_var_name,
          )
  
      node.orelse = self._visit_statement_block(node, node.orelse)
      return node
  
imports: import gast
  from tensorflow.python.autograph.core import converter
  from tensorflow.python.autograph.pyct import anno
  from tensorflow.python.autograph.pyct import parser
  from tensorflow.python.autograph.pyct import qual_names
  from tensorflow.python.autograph.pyct import templates
  from tensorflow.python.autograph.pyct.static_analysis import activity
  from tensorflow.python.autograph.pyct.static_analysis.annos import NodeAnno
label_desc: Use image node_id 5 for calling the ReturnStatementsTransformer obj's underlying member method code with example usage: obj.visit_While(node) and returns: node