Construct function
349763
function construct(constructor) {
            // Create constructor
            var c = function () {
                return constructor.apply(this);
            };
            // Assign prototype
            c.prototype = constructor.prototype;
            // Create new instance
            return service_factory_1.ServiceFactory.export(c, name, context);
        }
881558
def tree_construct(self, *args, **kwargs):
        
        l_files                 = []
        d_constructCallback     = {}
        fn_constructCallback    = None
        for k, v in kwargs.items():
            if k == 'l_files':           l_files                 = v
            if k == 'constructCallback': fn_constructCallback    = v

        index   = 1
        total   = len(l_files)
        for l_series in l_files:
            str_path    = os.path.dirname(l_series[0])
            l_series    = [ os.path.basename(i) for i in l_series]
            self.simpleProgress_show(index, total)
            self.d_inputTree[str_path]  = l_series
            if fn_constructCallback:
                kwargs['path']          = str_path
                d_constructCallback     = fn_constructCallback(l_series, **kwargs)
                self.d_inputTreeCallback[str_path]  = d_constructCallback
            self.d_outputTree[str_path] = ""
            index += 1
        return {
            'status':                   True,
            'd_constructCalback':       d_constructCallback,   
            'totalNumberOfAllSeries':   index
        }
869994
def create_function(self, func, name=None, database=None):
        
        if name is None:
            name = func.name
        database = database or self.current_database

        if isinstance(func, udf.ImpalaUDF):
            stmt = ddl.CreateUDF(func, name=name, database=database)
        elif isinstance(func, udf.ImpalaUDA):
            stmt = ddl.CreateUDA(func, name=name, database=database)
        else:
            raise TypeError(func)
        self._execute(stmt)
155235
function makeRequireFunction() {
    const Module = this.constructor;
    const self = this;

    function require(path) {
        try {
            exports.requireDepth += 1;
            return self.require(path);
        } finally {
            exports.requireDepth -= 1;
        }
    }

    function resolve(request) {
        return Module._resolveFilename(request, self);
    }

    require.resolve = resolve;

    require.main = process.mainModule;

    // Enable support to add extra extension types.
    require.extensions = Module._extensions;

    require.cache = Module._cache;

    return require;
}
267565
def _construct_lambda_function(self):
        
        lambda_function = LambdaFunction(self.logical_id, depends_on=self.depends_on,
                                         attributes=self.resource_attributes)

        if self.FunctionName:
            lambda_function.FunctionName = self.FunctionName

        lambda_function.Handler = self.Handler
        lambda_function.Runtime = self.Runtime
        lambda_function.Description = self.Description
        lambda_function.MemorySize = self.MemorySize
        lambda_function.Timeout = self.Timeout
        lambda_function.VpcConfig = self.VpcConfig
        lambda_function.Role = self.Role
        lambda_function.Environment = self.Environment
        lambda_function.Code = self._construct_code_dict()
        lambda_function.KmsKeyArn = self.KmsKeyArn
        lambda_function.ReservedConcurrentExecutions = self.ReservedConcurrentExecutions
        lambda_function.Tags = self._construct_tag_list(self.Tags)
        lambda_function.Layers = self.Layers

        if self.Tracing:
            lambda_function.TracingConfig = {"Mode": self.Tracing}

        if self.DeadLetterQueue:
            lambda_function.DeadLetterConfig = {"TargetArn": self.DeadLetterQueue['TargetArn']}

        return lambda_function
1153834
function(constructorFn, args) {

		    var newConstructorFn = function () {
			    constructorFn.apply(this, args);
		    };
		    newConstructorFn.prototype = constructorFn.prototype;
		    return new newConstructorFn();
	    }
1167804
function() {
    var
      tok = this.expect('function'),
      name = tok.val.name;

    // params
    this.state.push('function params');
    this.skipWhitespace();
    var params = this.params();
    this.skipWhitespace();
    this.expect(')');
    this.state.pop();

    // Body
    this.state.push('function');
    var fn = new nodes.Function(name, params);

    fn.column = tok.column;
    fn.lineno = tok.lineno;

    fn.block = this.block(fn);
    this.state.pop();
    return new nodes.Ident(name, fn);
  }
358893
def object_build_function(node, member, localname):
    """"""
    # pylint: disable=deprecated-method; completely removed in 2.0
    args, varargs, varkw, defaults = inspect.getargspec(member)
    if varargs is not None:
        args.append(varargs)
    if varkw is not None:
        args.append(varkw)
    func = build_function(
        getattr(member, "__name__", None) or localname, args, defaults, member.__doc__
    )
    node.add_local_node(func, localname)
262861
function compose () {
        var fns = arguments;

        return function () {
            var result = void 0;

            for (var i = fns.length - 1; i > -1; i--) {
                if (i === fns.length - 1) {
                    result = fns[i].apply(fns[i], arguments);
                } else {
                    result = fns[i].call(this, result);
                }
            }

            return result;
        };
    }
1128913
protected function _construct()
    {
        $this->addColumn('term_id', ['label' => '']);
        $this->addColumn(
            'values',
            ['label' => __('Synonym terms')]
        );

        $this->_addAfter = false;
        $this->_addButtonLabel = __('Add Synonym');

        parent::_construct();
    }
258620
def _onFunction( self, name, line, pos, absPosition,
                           keywordLine, keywordPos,
                           colonLine, colonPos, level ):
        "  "
        self.__flushLevel( level )
        self.objectsStack.append( Function( name, line, pos, absPosition,
                                            keywordLine, keywordPos,
                                            colonLine, colonPos ) )
        return
730221
def create_arguments(primary, pyfunction, call_node, scope):
    """"""
    args = list(call_node.args)
    args.extend(call_node.keywords)
    called = call_node.func
    # XXX: Handle constructors
    if _is_method_call(primary, pyfunction) and \
       isinstance(called, ast.Attribute):
        args.insert(0, called.value)
    return Arguments(args, scope)
197369
function typal_construct() {
        var o = typal_mix.apply(create(this), arguments);
        var constructor = o.constructor;
        var Klass = o.constructor = function () { return constructor.apply(this, arguments); };
        Klass.prototype = o;
        Klass.mix = typal_mix; // allow for easy singleton property extension
        return Klass;
    }
708727
def build_accumulate(function: Callable[[Any, Any], Tuple[Any, Any]] = None, *,
                     init: Any = NONE):
    
    _init = init

    def _build_accumulate(function: Callable[[Any, Any], Tuple[Any, Any]]):
        @wraps(function)
        def _wrapper(init=NONE) -> Accumulate:
            init = _init if init is NONE else init
            if init is NONE:
                raise TypeError('"init" argument has to be defined')
            return Accumulate(function, init=init)
        return _wrapper

    if function:
        return _build_accumulate(function)

    return _build_accumulate
272153
def constructor(
            self,
            name=None,
            function=None,
            return_type=None,
            arg_types=None,
            header_dir=None,
            header_file=None,
            recursive=None):
        """"""
        return (
            self._find_single(
                self._impl_matchers[scopedef_t.constructor],
                name=name,
                function=function,
                decl_type=self._impl_decl_types[
                    scopedef_t.constructor],
                return_type=return_type,
                arg_types=arg_types,
                header_dir=header_dir,
                header_file=header_file,
                recursive=recursive)
        )
311372
def _create_function(name, doc=""):
    """"""
    def _(col):
        sc = SparkContext._active_spark_context
        jc = getattr(sc._jvm.functions, name)(col._jc if isinstance(col, Column) else col)
        return Column(jc)
    _.__name__ = name
    _.__doc__ = doc
    return _
125512
function constructCollection(Collection, options) {
  return construct({
    input: Collection,
    expected: AmpersandCollection,
    createConstructor: collection,
    options: options
  });
}