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: Checks if any of the nodes are already in the graph
docstr_tok: ["Checks","if","any","of","the","nodes","are","already","in","the","graph"]
code: def _check_nodes(self, nodes):
      """Checks if any of the nodes are already in the graph"""
      node_names = [node.name for node in self._graph.nodes()]
      node_lineage = [node._hierarchy for node in self._graph.nodes()]
      for node in nodes:
          if node.name in node_names:
              idx = node_names.index(node.name)
              try:
                  this_node_lineage = node_lineage[idx]
              except IndexError:
                  raise OSError(
                      'Duplicate node name "%s" found.' % node.name
                  )
              else:
                  if this_node_lineage in [node._hierarchy, self.name]:
                      raise OSError(
                          'Duplicate node name "%s" found.' % node.name
                      )
          else:
              node_names.append(node.name)
  
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 18 for calling the Workflow obj's underlying member method code with example usage: obj._check_nodes(nodes) without return types