class_docstr: Transforms control flow structures like loops an conditionals.
class_docstr_tok: ["Transforms","control","flow","structures","like","loops","an","conditionals","."]
code: def _create_state_functions(
      self, block_vars, nonlocal_declarations, getter_name, setter_name
  ):
      if not block_vars:
          template = """
          def getter_name():
            return ()
          def setter_name(block_vars):
            pass
        """
          return templates.replace(
              template, getter_name=getter_name, setter_name=setter_name
          )
  
      guarded_block_vars = []
      for v in block_vars:
          if v.is_simple():
              guarded_block_vars.append(v)
          else:
              guarded_block_vars.append(
                  templates.replace_as_expression(
                      "ag__.ldu(lambda: var_, name)",
                      var_=v,
                      name=gast.Constant(str(v), kind=None),
                  )
              )
  
      template = """
        def getter_name():
          return guarded_state_vars,
        def setter_name(vars_):
          nonlocal_declarations
          state_vars, = vars_
      """
      return templates.replace(
          template,
          nonlocal_declarations=nonlocal_declarations,
          getter_name=getter_name,
          guarded_state_vars=guarded_block_vars,
          setter_name=setter_name,
          state_vars=tuple(block_vars),
      )
  
imports: import gast
  from tensorflow.python.autograph.core import converter
  from tensorflow.python.autograph.lang import directives
  from tensorflow.python.autograph.pyct import anno
  from tensorflow.python.autograph.pyct import cfg
  from tensorflow.python.autograph.pyct import origin_info
  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 import annos
  from tensorflow.python.autograph.pyct.static_analysis import liveness
  from tensorflow.python.autograph.pyct.static_analysis import reaching_definitions
  from tensorflow.python.autograph.pyct.static_analysis import reaching_fndefs
label_desc: Use image node_id 4 for calling the ControlFlowTransformer obj's underlying member method code with example usage: obj._create_state_functions(block_vars, nonlocal_declarations, getter_name, setter_name) and returns: templates, templates