Add a seeding method and returns self.

        :param seed_type: The seed type
        :param nodes: A node or list of nodes
        :returns: self for fluid API
17224
def _append_seed_handle_nodes(self, seed_type: str, nodes: MaybeNodeList) -> 'Seeding':
        
        return self._append_seed(seed_type, _handle_nodes(nodes))
1213316
def add_nodes(self, nodes, nesting=1):
        
        hopNodes = set()  # nodes in this hop
        hopEdges = []     # edges in this hop
        # get nodes and edges for this hop
        for i, n in zip(range(len(nodes)), nodes):
            r, g, b = rainbowcolour(i, len(nodes))
            colour = '#%02X%02X%02X' % (r, g, b)
            for nu in n.uses:
                if nu not in self.added:
                    hopNodes.add(nu)
                hopEdges.append((n, nu, 'dashed', colour))
            if hasattr(n, 'ancestor'):
                if n.ancestor not in self.added:
                    hopNodes.add(n.ancestor)
                hopEdges.append((n, n.ancestor, 'solid', colour))
        # add nodes, edges and attributes to the graph if maximum number of
        # nodes is not exceeded
        if self.add_to_graph(hopNodes, hopEdges, nesting):
            self.dot.attr('graph', size='11.875,1000.0')
401789
def run(self, *nodes):
        
        nodes = nodes or self.nodes
        self._prelude(*nodes)

        @write_yaml_report
        def _run():
            self._build_installer()
            runner = functools.partial(run_on_host, self.campaign)
            if self.campaign.network.max_concurrent_runs > 1:
                pool = Pool(self.campaign.network.max_concurrent_runs)
                pool.map(runner, nodes)
            else:
                for node in nodes:
                    runner(node)
            return nodes

        with pushd(self.campaign_path):
            _run()
405465
def add_node(cls, cluster_id_label, parameters=None):
      
      conn = Qubole.agent(version=Cluster.api_version)
      parameters = {} if not parameters else parameters
      return conn.post(cls.element_path(cluster_id_label) + "/nodes", data={"parameters" : parameters})
1075696
private Node createNewMembershipTypeNode(Session session, MembershipTypeImpl mType) throws Exception
   {
      Node storageTypesNode = utils.getMembershipTypeStorageNode(session);
      return storageTypesNode.addNode(mType.getName());
   }
1164572
def _seed(self, seed=-1):
        
        if seed != -1:
          self._random = np.random.RandomState(seed)
        else:
          self._random = np.random.RandomState()
571651
def add(node)
      if @nodes.key?(node.key)
        raise DuplicateNodeError.new(node.key)
      end

      @nodes[node.key] = node
    end
566409
def _add_new_reset_method(cls):
    

    #
    # Create and assign automatically generated reset() method
    #


    def new_reset_method(self, seed=None):
        logger.debug(f'[EEE] Inside automatically generated reset() method for {self} (seed={seed})')

        if seed is not None:
            self.seed_generator.reset(seed)
            for name, gen in self.field_gens.items():
                next_seed = next(self.seed_generator)
                gen.reset(next_seed)

            # TODO: the following should be covered by the newly added
            # reset() method in IndependentGeneratorMeta. However, for
            # some reason we can't call this via the usual `orig_reset()`
            # pattern, so we have to duplicate this here. Not ideal...
            for c in self._clones:
                c.reset_clone(seed)

        return self

    cls.reset = new_reset_method
962913
def append_seeding_induction(self, nodes: Union[BaseEntity, List[BaseEntity], List[Dict]]) -> Seeding:
        
        return self.seeding.append_induction(nodes)
786217
def addNode(self, node: Node):
        
        self._nodes[node.id] = node
        req = node.ledgerRequest()
        if req:
            self.pendRequest(req, node.id)
        return len(self._pending)
14712
private void addFirstOfType() {
		for (Node node : nodes) {
			Index index = helper.getIndexInParent(node, true);
			if (index.index == 0)
				result.add(node);
		}
	}
29596
def append_seeding_annotation(self, annotation: str, values: Set[str]) -> Seeding:
        
        return self.seeding.append_annotation(annotation, values)
11831
def add_new_reset_method(cls):
    
    orig_reset = cls.reset

    def new_reset(self, seed=None):
        logger.debug(f"Calling reset() on {self} (seed={seed})")
        orig_reset(self, seed)
        for c in self._dependent_generators:
            c.reset_dependent_generator(seed)
        return self

    cls.reset = new_reset
692434
public void setNodeType(NodeType type) {
        addField(ConfigureNodeFields.node_type, FormField.Type.list_single);
        setAnswer(ConfigureNodeFields.node_type.getFieldName(), getListSingle(type.toString()));
    }
1080803
def append_seeding_neighbors(self, nodes: Union[BaseEntity, List[BaseEntity], List[Dict]]) -> Seeding:
        
        return self.seeding.append_neighbors(nodes)
71647
def add_resource_types(resource_i, types):
    
    if types is None:
        return []

    existing_type_ids = []
    if resource_i.types:
        for t in resource_i.types:
            existing_type_ids.append(t.type_id)

    new_type_ids = []
    for templatetype in types:

        if templatetype.id in existing_type_ids:
            continue

        rt_i = ResourceType()
        rt_i.type_id     = templatetype.id
        rt_i.ref_key     = resource_i.ref_key
        if resource_i.ref_key == 'NODE':
            rt_i.node_id      = resource_i.id
        elif resource_i.ref_key == 'LINK':
            rt_i.link_id      = resource_i.id
        elif resource_i.ref_key == 'GROUP':
            rt_i.group_id     = resource_i.id
        resource_i.types.append(rt_i)
        new_type_ids.append(templatetype.id)

    return new_type_ids
1350902
def seed(self):
        
        form = self.request.form
        prefix = form.get('prefix', None)
        if prefix is None:
            return 'No prefix provided'
        seed = form.get('seed', None)
        if seed is None:
            return 'No seed provided'
        if not seed.isdigit():
            return 'Seed must be a digit'
        seed = int(seed)
        if seed < 0:
            return 'Seed cannot be negative'

        new_seq = self.set_seed(prefix, seed)
        return 'IDServerView: "%s" seeded to %s' % (prefix, new_seq)