Return a factory function for creating Nodes for this
        construction environment.
969939
def get_factory(self, factory, default='File'):
        
        name = default
        try:
            is_node = issubclass(factory, SCons.Node.FS.Base)
        except TypeError:
            # The specified factory isn't a Node itself--it's
            # most likely None, or possibly a callable.
            pass
        else:
            if is_node:
                # The specified factory is a Node (sub)class.  Try to
                # return the FS method that corresponds to the Node's
                # name--that is, we return self.fs.Dir if they want a Dir,
                # self.fs.File for a File, etc.
                try: name = factory.__name__
                except AttributeError: pass
                else: factory = None
        if not factory:
            # They passed us None, or we picked up a name from a specified
            # class, so return the FS method.  (Note that we *don't*
            # use our own self.{Dir,File} methods because that would
            # cause env.subst() to be called twice on the file name,
            # interfering with files that have $$ in them.)
            factory = getattr(self.fs, name)
        return factory
654453
function factory() {
        var utilx = {};

        $forEach(objectKeys($), function (key1) {
            if (!pHasOwn.call(utilx, 'methods')) {
                defineProperty(utilx, 'methods', assign({
                    value: []
                }, propNotEnumerable));
            }

            defineProperty(utilx, key1, assign({
                value: $[key1]
            }, propNotEnumerable));

            if (isPlainObject($[key1])) {
                if (!pHasOwn.call(utilx[key1], 'methods')) {
                    defineProperty(utilx[key1], 'methods', assign({
                        value: []
                    }, propNotEnumerable));
                }

                $forEach(objectKeys($[key1]), function (key2) {
                    defineProperty(utilx[key1], key2, assign({
                        value: $[key1][key2]
                    }, propNotEnumerable));

                    if (isPlainObject($[key1][key2])) {
                        if (!pHasOwn.call(utilx[key1][key2], 'methods')) {
                            defineProperty(utilx[key1][key2], 'methods', assign({
                                value: []
                            }, propNotEnumerable));
                        }

                        $forEach(objectKeys($[key1][key2]), function (key3) {
                            defineProperty(utilx[key1][key2], key3, assign({
                                value: $[key1][key2][key3]
                            }, propNotEnumerable));

                            $push(utilx[key1][key2].methods, key3);
                        });
                    } else {
                        $push(utilx[key1].methods, key2);
                    }
                });
            } else {
                $push(utilx.methods, key1);
            }
        });

        defineProperties(utilx.Number, {
            POSITIVE_ZERO: propConstant,

            NEGATIVE_ZERO: propConstant,

            UNSAFE_INTEGER: propConstant,

            WORD8: propConstant,

            UWORD8: propConstant,

            WORD16: propConstant,

            UWORD16: propConstant,

            WORD32: propConstant,

            UWORD32: propConstant,

            MAX_UINT32: propConstant,

            MAX_INT32: propConstant,

            MIN_INT32: propConstant,

            MAX_UINT16: propConstant,

            MAX_INT16: propConstant,

            MIN_INT16: propConstant,

            MAX_UINT8: propConstant,

            MAX_INT8: propConstant,

            MIN_INT8: propConstant,

            MAX_SAFE_INTEGER: propConstant,

            MIN_SAFE_INTEGER: propConstant,

            MAX_VALUE: propConstant,

            MIN_VALUE: propConstant,

            EPSILON: propConstant,

            NaN: propConstant,

            POSITIVE_INFINITY: propConstant,

            NEGATIVE_INFINITY: propConstant
        });

        return utilx;
    }
351860
function factory(root, definitions, existing) {
  var id = 0

  return one

  /* Transform a normal link/image based on bound
   * `definitions`. */
  function one(node, index, parent) {
    var url = node.url
    var title = node.title
    var replacement
    var identifier
    var titles
    var definition

    if (own.call(definitions, url)) {
      titles = definitions[url]
    } else {
      titles = {}
      definitions[url] = titles
    }

    if (own.call(titles, title)) {
      identifier = titles[title].identifier
    } else {
      do {
        identifier = String(++id)
      } while (existing.indexOf(identifier) !== -1)

      definition = {
        type: 'definition',
        identifier: identifier,
        title: title,
        url: url
      }

      titles[title] = definition

      root.children.push(definition)
    }

    replacement = {
      type: node.type + 'Reference',
      identifier: identifier,
      referenceType: 'full'
    }

    if (node.type === 'image') {
      replacement.alt = node.alt
    } else {
      replacement.children = node.children
    }

    parent.children[index] = replacement
  }
}
894936
def make_node(cls, func_name, lineno, type_=None):
        
        entry = global_.SYMBOL_TABLE.declare_func(func_name, lineno, type_=type_)
        if entry is None:
            return None

        entry.declared = True
        return cls(entry, lineno)
929394
def construct(cls, faker, path_to_factories=None):
        
        factory = faker.__class__()

        if path_to_factories is not None and os.path.isdir(path_to_factories):
            for filename in os.listdir(path_to_factories):
                if os.path.isfile(filename):
                    cls._resolve(path_to_factories, filename)

        return factory
1066614
def create(input_length, hidden_layers, activation='tanh', normalization=None):
    
    def instantiate(**_):
        return MLP(
            input_length=input_length,
            hidden_layers=hidden_layers,
            activation=activation,
            normalization=normalization
        )

    return ModelFactory.generic(instantiate)
303843
def createProgBuilder(env):
    

    try:
        program = env['BUILDERS']['Program']
    except KeyError:
        import SCons.Defaults
        program = SCons.Builder.Builder(action = SCons.Defaults.LinkAction,
                                        emitter = '$PROGEMITTER',
                                        prefix = '$PROGPREFIX',
                                        suffix = '$PROGSUFFIX',
                                        src_suffix = '$OBJSUFFIX',
                                        src_builder = 'Object',
                                        target_scanner = ProgramScanner)
        env['BUILDERS']['Program'] = program

    return program
1167021
def create_basic_op_node(op_name, node, kwargs):
    """"""
    name, input_nodes, _ = get_inputs(node, kwargs)

    node = onnx.helper.make_node(
        op_name,
        input_nodes,
        [name],
        name=name
    )
    return [node]
597928
function spawnNodesWithId (n, factory, callback) {
  spawnNodes(n, factory, (err, nodes) => {
    if (err) return callback(err)
    map(nodes, identify, callback)
  })
}
516740
def makeService(self, options):
        
        return NodeService(
            port=options['port'],
            host=options['host'],
            broker_host=options['broker_host'],
            broker_port=options['broker_port'],
            debug=options['debug']
        )
873009
public List<FacesConfigFactoryType<FacesConfigType<T>>> getAllFactory()
   {
      List<FacesConfigFactoryType<FacesConfigType<T>>> list = new ArrayList<FacesConfigFactoryType<FacesConfigType<T>>>();
      List<Node> nodeList = childNode.get("factory");
      for(Node node: nodeList)
      {
         FacesConfigFactoryType<FacesConfigType<T>>  type = new FacesConfigFactoryTypeImpl<FacesConfigType<T>>(this, "factory", childNode, node);
         list.add(type);
      }
      return list;
   }
205330
function factory(type) {
  point.displayName = type

  return point

  /* Get a point in `node.position` at a bound `type`. */
  function point(node) {
    var point = (node && node.position && node.position[type]) || {}

    return {
      line: point.line || null,
      column: point.column || null,
      offset: isNaN(point.offset) ? null : point.offset
    }
  }
}
422365
def build(cls, node):
    """"""
    if not isinstance(node, gast.FunctionDef):
      raise ValueError
    namer = cls()
    namer.names.update(get_names(node))
    return namer
646746
def make_node(clss, node, *params):
        ''' 
        '''
        if node is None:
            node = clss()

        if node.token != 'PARAMLIST':
            return clss.make_node(None, node, *params)

        for i in params:
            if i is not None:
                node.appendChild(i)

        return node
21152
def _construct_node(loader, node, base_tag):
    ""
    node = copy.copy(node) # bypass YAML anti recursion
    best_tag = base_tag
    best_fit = 0
    for key, val in loader.DEFAULT_TAGS.iteritems():
        lenk = len(key)
        if lenk <= best_fit:
            continue
        if base_tag.startswith(key):
            best_tag = val + base_tag[lenk:]
            best_fit = lenk
    node.tag = best_tag
    return loader.construct_object(node, deep=True)
466411
function factory(tree, options) {
  var settings = options || {}
  var dangerous = settings.allowDangerousHTML

  h.dangerous = dangerous
  h.definition = definitions(tree, settings)
  h.footnotes = []
  h.augment = augment
  h.handlers = xtend(handlers, settings.handlers || {})

  visit(tree, 'footnoteDefinition', visitor)

  return h

  // Finalise the created `right`, a hast node, from `left`, an mdast node.
  function augment(left, right) {
    var data
    var ctx

    // Handle `data.hName`, `data.hProperties, `hChildren`.
    if (left && 'data' in left) {
      data = left.data

      if (right.type === 'element' && data.hName) {
        right.tagName = data.hName
      }

      if (right.type === 'element' && data.hProperties) {
        right.properties = xtend(right.properties, data.hProperties)
      }

      if (right.children && data.hChildren) {
        right.children = data.hChildren
      }
    }

    ctx = left && left.position ? left : {position: left}

    if (!generated(ctx)) {
      right.position = {
        start: position.start(ctx),
        end: position.end(ctx)
      }
    }

    return right
  }

  // Create an element for a `node`.
  function h(node, tagName, props, children) {
    if (
      (children === undefined || children === null) &&
      typeof props === 'object' &&
      'length' in props
    ) {
      children = props
      props = {}
    }

    return augment(node, {
      type: 'element',
      tagName: tagName,
      properties: props || {},
      children: children || []
    })
  }

  function visitor(definition) {
    h.footnotes.push(definition)
  }
}
803239
def _creation_function(self, idx, seed, preset):
        
        return lambda: self.env.instantiate(seed=seed, serial_id=idx, preset=preset)