class_docstr: Transforms control flow structures like loops an conditionals.
class_docstr_tok: ["Transforms","control","flow","structures","like","loops","an","conditionals","."]
code: def _create_nonlocal_declarations(self, vars_):
      vars_ = set(vars_)
      results = []
      global_vars = self.state[_Function].scope.globals & vars_
  
      if global_vars:
          results.append(gast.Global([str(v) for v in global_vars]))
  
      nonlocal_vars = [
          v
          for v in vars_
          if not v.is_composite() and v not in global_vars
      ]
      if nonlocal_vars:
          results.append(gast.Nonlocal([str(v) for v in nonlocal_vars]))
  
      return results
  
imports: import gast
  from nvidia.dali._autograph.core import converter
  from nvidia.dali._autograph.lang import directives
  from nvidia.dali._autograph.pyct import anno
  from nvidia.dali._autograph.pyct import cfg
  from nvidia.dali._autograph.pyct import origin_info
  from nvidia.dali._autograph.pyct import parser
  from nvidia.dali._autograph.pyct import qual_names
  from nvidia.dali._autograph.pyct import templates
  from nvidia.dali._autograph.pyct.static_analysis import activity
  from nvidia.dali._autograph.pyct.static_analysis import annos
  from nvidia.dali._autograph.pyct.static_analysis import liveness
  from nvidia.dali._autograph.pyct.static_analysis import reaching_definitions
  from nvidia.dali._autograph.pyct.static_analysis import reaching_fndefs
label_desc: Use image node_id 3 for calling the ControlFlowTransformer obj's underlying member method code with example usage: obj._create_nonlocal_declarations(vars_) and returns: results