parameters: (executor, dirname, graph)
docstring: Save persistable nodes to the given directory by the executor.
  
      Args:
          executor(Executor): The executor to run for saving node values.
          dirname(str): The directory path.
          graph(IrGraph): All the required persistable nodes in the graph will be saved.
docstring_summary: Save persistable nodes to the given directory by the executor.
docstring_tokens: Save persistable nodes to the given directory by the executor .
function: def _save_persistable_nodes(executor, dirname, graph):
      """
      Save persistable nodes to the given directory by the executor.
  
      Args:
          executor(Executor): The executor to run for saving node values.
          dirname(str): The directory path.
          graph(IrGraph): All the required persistable nodes in the graph will be saved.
      """
      persistable_node_names = set()
      persistable_nodes = []
      all_persistable_nodes = graph.all_persistable_nodes()
      for node in all_persistable_nodes:
          name = cpt.to_text(node.name())
          if name not in persistable_node_names:
              persistable_node_names.add(name)
              persistable_nodes.append(node)
      program = Program()
      var_list = []
      for node in persistable_nodes:
          var_desc = node.var()
          if var_desc.type() == core.VarDesc.VarType.RAW or \
                          var_desc.type() == core.VarDesc.VarType.READER:
              continue
          var = program.global_block().create_var(
              name=var_desc.name(),
              shape=var_desc.shape(),
              dtype=var_desc.dtype(),
              type=var_desc.type(),
              lod_level=var_desc.lod_level(),
              persistable=var_desc.persistable())
          var_list.append(var)
      save_vars(executor=executor, dirname=dirname, vars=var_list)
function_tokens: def _save_persistable_nodes ( executor , dirname , graph ) : persistable_node_names = set ( ) persistable_nodes = [ ] all_persistable_nodes = graph . all_persistable_nodes ( ) for node in all_persistable_nodes : name = cpt . to_text ( node . name ( ) ) if name not in persistable_node_names : persistable_node_names . add ( name ) persistable_nodes . append ( node ) program = Program ( ) var_list = [ ] for node in persistable_nodes : var_desc = node . var ( ) if var_desc . type ( ) == core . VarDesc . VarType . RAW or var_desc . type ( ) == core . VarDesc . VarType . READER : continue var = program . global_block ( ) . create_var ( name = var_desc . name ( ) , shape = var_desc . shape ( ) , dtype = var_desc . dtype ( ) , type = var_desc . type ( ) , lod_level = var_desc . lod_level ( ) , persistable = var_desc . persistable ( ) ) var_list . append ( var ) save_vars ( executor = executor , dirname = dirname , vars = var_list )