parameters: (self,
                         entity_type,
                         entity_name,
                         new_entity_name,
                         entity_name_list_function,
                         entity_objects)
docstring: Rename an entity.
docstring_summary: Rename an entity.
docstring_tokens: Rename an entity .
function: def _rename_entity(self,
                         entity_type,
                         entity_name,
                         new_entity_name,
                         entity_name_list_function,
                         entity_objects):
          """Rename an entity."""
          [entity_name] = self._format_id_list(
              [entity_name],
              entity_name_list_function(),
              entity_type,
              single=True)
          if new_entity_name == entity_name:
              return
          if new_entity_name in entity_name_list_function():
              self._exists_warning(new_entity_name, entity_type)
          entity_objects[new_entity_name] = entity_objects[entity_name]
          del entity_objects[entity_name]
function_tokens: def _rename_entity ( self , entity_type , entity_name , new_entity_name , entity_name_list_function , entity_objects ) : [ entity_name ] = self . _format_id_list ( [ entity_name ] , entity_name_list_function ( ) , entity_type , single = True ) if new_entity_name == entity_name : return if new_entity_name in entity_name_list_function ( ) : self . _exists_warning ( new_entity_name , entity_type ) entity_objects [ new_entity_name ] = entity_objects [ entity_name ] del entity_objects [ entity_name ]