class_docstr: Controls the setup and execution of a pipeline of processes.
class_docstr_tok: ["Controls","the","setup","and","execution","of","a","pipeline","of","processes","."]
docstr: Create a workflow object.
  
  Parameters
  ----------
  name : alphanumeric string
      unique identifier for the workflow
  base_dir : string, optional
      path to workflow storage
docstr_tok: ["Create","a","workflow","object",".","Parameters","--","--","--","--","--","name",":","alphanumeric","string","unique","identifier","for","the","workflow","base_dir",":","string",",","optional","path","to","workflow","storage"]
code: def __init__(self, name, base_dir=None):
      """Create a workflow object.
  
      Parameters
      ----------
      name : alphanumeric string
          unique identifier for the workflow
      base_dir : string, optional
          path to workflow storage
  
      """
      import networkx as nx
  
      super().__init__(name, base_dir)
      self._graph = nx.DiGraph()
  
      self._nodes_cache = set()
      self._nested_workflows_cache = set()
  
imports: import os
  import os.path
  import sys
  from datetime import datetime
  from copy import deepcopy
  import pickle
  import shutil
  import numpy
  from ...None import config, logging
  from ...utils.misc import str2bool
  from ...utils.functions import getsource, create_function_from_source
  from ...interfaces.base import traits, TraitedSpec, TraitDictObject, TraitListObject
  from ...utils.filemanip import save_json
  from .utils import generate_expanded_graph, export_graph, write_workflow_prov, write_workflow_resources, format_dot, topological_sort, get_print_name, merge_dict, format_node
  from .base import EngineBase
  from .nodes import MapNode
label_desc: Use image node_id 1 to create a new Workflow object from inherited base classes: EngineBase with example: obj = Workflow(name, base_dir)