parameters: (self, node_set_id, new_node_set_id)
docstring: Change a node set id or name.
  
          This function can be used to change either the node set id or name.
          If 'new_node_set_id' is an integer, it will change the id. If it is a
          string, it will change the name.
  
          Example:
          >>> model.rename_node_set(1, 100)
          >>> model.rename_node_set(1, 'node_group_1')
docstring_summary: Change a node set id or name.
docstring_tokens: Change a node set id or name .
function: def rename_node_set(self, node_set_id, new_node_set_id):
          """
          Change a node set id or name.
  
          This function can be used to change either the node set id or name.
          If 'new_node_set_id' is an integer, it will change the id. If it is a
          string, it will change the name.
  
          Example:
          >>> model.rename_node_set(1, 100)
          >>> model.rename_node_set(1, 'node_group_1')
  
          """
          [node_set_id] = self._format_node_set_id_list(
              [node_set_id],
              single=True)
          # if we're just changing the name:
          if type(new_node_set_id) is str:
              # if the same name already, just exit
              if self.get_node_set_name(node_set_id) == new_node_set_id:
                  return
              # if the name already exists, issue a warning
              if self.node_set_exists(new_node_set_id):
                  self._exists_warning('"' + new_node_set_id + '"',
                                       'node set')
              # rename it
              self.node_sets[node_set_id][0] = new_node_set_id
              return
          # rename it
          self._rename_entity('node set',
                              node_set_id,
                              new_node_set_id,
                              self.get_node_set_ids,
                              self.node_sets)
function_tokens: def rename_node_set ( self , node_set_id , new_node_set_id ) : [ node_set_id ] = self . _format_node_set_id_list ( [ node_set_id ] , single = True ) # if we're just changing the name: if type ( new_node_set_id ) is str : # if the same name already, just exit if self . get_node_set_name ( node_set_id ) == new_node_set_id : return # if the name already exists, issue a warning if self . node_set_exists ( new_node_set_id ) : self . _exists_warning ( '"' + new_node_set_id + '"' , 'node set' ) # rename it self . node_sets [ node_set_id ] [ 0 ] = new_node_set_id return # rename it self . _rename_entity ( 'node set' , node_set_id , new_node_set_id , self . get_node_set_ids , self . node_sets )