A helper function that performs some work in its own Span.
551741
private static void performWork(Span parent) {
    SpanBuilder spanBuilder =
        tracer
            .spanBuilderWithExplicitParent("internal_work", parent)
            .setRecordEvents(true)
            .setSampler(Samplers.alwaysSample());
    try (Scope scope = spanBuilder.startScopedSpan()) {
      Span span = tracer.getCurrentSpan();
      span.putAttribute("my_attribute", AttributeValue.stringAttributeValue("blue"));
      span.addAnnotation("Performing work.");
      sleepFor(20); // Working hard here.
      span.addAnnotation("Done work.");
    }
  }
308106
function wrap(ctx, fn, key) {
    return function() {
        var def = Q.defer(),
            args = _.toArray(arguments);

        args.push(def.makeNodeResolver());
        fn.apply(ctx, args);

        return def.promise;
    }
}
811780
function step(element, type, cb) {
    return function generate(error, html) {
      html += minimize.helpers[type](element);
      return returns(error, html, cb);
    }
  }
1363178
def handler(event):
    """"""
    def decorator(fn):
        def apply(cls):
            event.connect(fn, sender=cls)
            return cls

        fn.apply = apply
        return fn
    return decorator
179522
def task(obj = None, deps = None):
	""""""

	# The decorator is not used as a function
	if callable(obj):
		__task(obj.__name__, obj)
		return obj

	# The decorator is used as a function
	def __decorated(func):
		__task(obj if obj else obj.__name__, deps, func)
		return func
	return __decorated
144075
function () {
    instance = this;

    parser = new FormulaParser(instance);

    instance.formulas = Formula;
    instance.matrix = new Matrix();

    instance.custom = {};

    if (rootElement) {
      instance.matrix.scan();
    }
  }
671245
function(choice, items) {
			return function(event) {
				if (choice.callback) {
					choice.callback.call(choice, items, event);
				}
			};
		}
185338
def _wrap_in_place(func):  # noqa: D202
        """"""

        @wraps(func)
        def wrapper(graph, *args, **kwargs):
            """Apply the enclosed function and returns the graph."""
            func(graph, *args, **kwargs)
            return graph

        return wrapper
222136
function flip(fn) {
  return function() {
    var first = arguments[0];
    var second = arguments[1];
    var rest = [].slice.call(arguments, 2);
    return fn.apply(this, [second, first].concat(rest));
  };
}
1265313
function(decoration) {
		var slice = [].slice;
		return function(base) {
			return function() {
				var argv, callback, result, that = this;
				argv = 1 <= arguments.length ? slice.call(arguments, 0) : [];
				result = void 0;
				callback = function() {
					return (result = base.apply(that, argv));
				};
				decoration.apply(this, [callback].concat(argv));
				return result;
			};
		};
	}
1211515
function done( error ) {
		if ( error ) {
			return clbk( error );
		}
		count += 1;
		if ( count === len ) {
			clbk( null, concat( out ) );
		}
	}
1112244
function (originalIt) {
    return function it(desc, cb) {
      if (cb.length === 0) {
        originalIt(desc, cb);
      } else {
        originalIt(desc, wrapInTryCatch(cb));
      }
    };
  }
814128
def op(cls,text,*args,**kwargs):
        
        return cls.fn(text,*args,**kwargs)
1183070
def _call(self, x, out=None):
        """"""
        if out is None:
            out = self.range.element()
        out.lincomb(self.a, x[0], self.b, x[1])
        return out
905480
function doOnce(fn) {
    var called = false;
    return function() {
      if (called) throw new Error("Callback already called.");
      called = true;
      fn.apply(root, arguments);
    };
  }
421056
function process( $tpl, &$text, $nspace, $current_nspace )
    {
        $tmp = $tpl->doFunction( $this->Name, $this, $nspace, $current_nspace );
        if ( $tmp === false )
            return;
        $tpl->appendElement( $text, $tmp, $nspace, $current_nspace );
    }
860725
def _make_wrapper(f):
    """"""
    @wraps(f)
    def wrapper(*args, **kwargs):
        return f(*args, **kwargs)
    wrapper._pecan = f._pecan.copy()
    return wrapper