class_docstr: Defines common attributes and functions for workflows and nodes.
  
  Implements the more general view of a task.
class_docstr_tok: ["Defines","common","attributes","and","functions","for","workflows","and","nodes",".","Implements","the","more","general","view","of","a","task","."]
code: def name(self, name):
      if not name or not re.match(r"^[\w-]+$", name):
          raise ValueError(
              '[Workflow|Node] name "%s" is not valid.' % name
          )
      self._name = name
  
imports: from copy import deepcopy
  import re
  import numpy
  from ...None import config
  from ...interfaces.base import DynamicTraitedSpec
  from ...utils.filemanip import loadpkl, savepkl
label_desc: Use image node_id 3 for calling the EngineBase obj's underlying member method code with example usage: obj.name(name) without return types