Value might be either name registered in System namespace, or object, either
            StatusObject or Callable. If Callable, evaluate :meth:`.call` method. If StatusObject,
            return status.
966662
def call_eval(self, value, caller, return_value=True, **kwargs):
        
        value = self.name_to_system_object(value)
        if return_value and isinstance(value, AbstractStatusObject):
            return value.status
        if hasattr(value, 'call'):
            return self.call_eval(value.call(caller, **kwargs), caller, return_value, **kwargs)
        else:
            return value
826031
def get_value(cls, value):
        ''''''
        if isinstance(value, (basestring, int)):
            value = cls.fetch_by(id=value)
        return value if isinstance(value, cls) else None
1080948
def apply_if_callable(maybe_callable, obj, **kwargs):
    

    if callable(maybe_callable):
        return maybe_callable(obj, **kwargs)

    return maybe_callable
1227883
public static Object applyOrCall(boolean isApply,
                                     Context cx, Scriptable scope,
                                     Scriptable thisObj, Object[] args)
    {
        int L = args.length;
        Callable function = getCallable(thisObj);

        Scriptable callThis = null;
        if (L != 0) {
            if  (cx.hasFeature(Context.FEATURE_OLD_UNDEF_NULL_THIS)) {
                callThis = toObjectOrNull(cx, args[0], scope);
            } else {
                callThis = args[0] == Undefined.instance ? Undefined.SCRIPTABLE_UNDEFINED : toObjectOrNull(cx, args[0], scope);
            }
        }
        if (callThis == null && cx.hasFeature(Context.FEATURE_OLD_UNDEF_NULL_THIS)) {
            callThis = getTopCallScope(cx); // This covers the case of args[0] == (null|undefined) as well.
        }

        Object[] callArgs;
        if (isApply) {
            // Follow Ecma 15.3.4.3
            callArgs = L <= 1 ? ScriptRuntime.emptyArgs :
                getApplyArguments(cx, args[1]);
        } else {
            // Follow Ecma 15.3.4.4
            if (L <= 1) {
                callArgs = ScriptRuntime.emptyArgs;
            } else {
                callArgs = new Object[L - 1];
                System.arraycopy(args, 1, callArgs, 0, L - 1);
            }
        }

        return function.call(cx, scope, callThis, callArgs);
    }
387279
public Object eval( CallStack callstack, Interpreter interpreter )
        throws EvalError
    {
        NameSpace namespace = callstack.top();
        BSHAmbiguousName nameNode = getNameNode();

      // get caller info for assert fail
      if ("fail".equals(nameNode.text))
          interpreter.getNameSpace().setNode(this);

        // Do not evaluate methods this() or super() in class instance space
        // (i.e. inside a constructor)
        if ( namespace.getParent() != null && namespace.getParent().isClass
            && ( nameNode.text.equals("super") || nameNode.text.equals("this") )
        )
            return Primitive.VOID;

        Name name = nameNode.getName(namespace);
        Object[] args = getArgsNode().getArguments(callstack, interpreter);

// This try/catch block is replicated is BSHPrimarySuffix... need to
// factor out common functionality...
// Move to Reflect?
        try {
            return name.invokeMethod( interpreter, args, callstack, this);
        } catch ( ReflectError e ) {
            throw new EvalError(
                "Error in method invocation: " + e.getMessage(),
                this, callstack, e );
        } catch ( InvocationTargetException e )
        {
            String msg = "Method Invocation "+name;
            Throwable te = e.getCause();

            /*
                Try to squeltch the native code stack trace if the exception
                was caused by a reflective call back into the bsh interpreter
                (e.g. eval() or source()
            */
            boolean isNative = true;
            if ( te instanceof EvalError )
                if ( te instanceof TargetError )
                    isNative = ((TargetError)te).inNativeCode();
                else
                    isNative = false;

            throw new TargetError( msg, te, this, callstack, isNative );
        } catch ( UtilEvalError e ) {
            throw e.toEvalError( this, callstack );
        }
    }
201386
function checkCommon(call) {
    if (call.callee.type !== 'Identifier') return
    if (call.callee.name !== 'require') return
    if (call.arguments.length !== 1) return

    const modulePath = call.arguments[0]
    if (modulePath.type !== 'Literal') return
    if (typeof modulePath.value !== 'string') return

    checkSourceValue(modulePath, call)
  }
133351
private Object itemValue(Object obj, Object item) throws NoSuchMethodException,
            ClassNotFoundException, InvocationTargetException, IllegalAccessException
    {
        // String value
        if (item instanceof String) return item;

        XmlParser.Node node = (XmlParser.Node) item;
        String tag = node.getTag();
        if ("Call".equals(tag)) return call(obj, node);
        if ("Get".equals(tag)) return get(obj, node);
        if ("New".equals(tag)) return newObj(obj, node);
        if ("Ref".equals(tag)) return refObj(obj, node);
        if ("Array".equals(tag)) return newArray(obj, node);

        if ("SystemProperty".equals(tag))
        {
            String name = node.getAttribute("name");
            String defaultValue = node.getAttribute("default");
            return System.getProperty(name, defaultValue);
        }

        log.warn("Unknown value tag: " + node, new Throwable());
        return null;
    }
484452
def call(self, params, _context, **kwargs):
        ''''''

        assert len(params) == self.paramCount
        # using setattr because '=' is not allowed inside of lambdas
        return evaluate_impl(self.body, params).then(lambda value: setattr(_context.results, 'value', value))
755604
def get(self):
        
        if not self._evaluated:
            self._val = self._func(*self._args, **self._kwargs)
            self._evaluated = True
        return self._val
553565
def status(self, value):
        
        if self._bug.get('id', None):
            if value in VALID_STATUS:
                self._bug['status'] = value
            else:
                raise BugException("Invalid status type was used")
        else:
            raise BugException("Can not set status unless there is a bug id."
                               " Please call Update() before setting")
181466
function callnTimes (object, methodName, count) {
    let returnValue
    while (count--) returnValue = object[methodName]()
    return returnValue
  }
794570
def call(self):
        
        is_mutable = False
        if self.token.nature == Nature.MUT:
            is_mutable = True
            self._process(Nature.MUT)

        identifier = Identifier(name=self.token.value)
        self._process(Nature.ID)

        if self.token.nature == Nature.LPAREN:
            return FunctionCall(identifier=identifier, parameters=self.parameters())
        else:
            return Variable(identifier=identifier, is_mutable=is_mutable)
819840
def callable_validator(v: Any) -> AnyCallable:
    
    if callable(v):
        return v

    raise errors.CallableError(value=v)
1261565
def _call(self, x, out=None):
        """"""
        if self.domain.is_real:
            return self._call_real(x, out)

        elif self.domain.is_complex:
            result_parts = [
                self._call_real(x.real, getattr(out, 'real', None)),
                self._call_real(x.imag, getattr(out, 'imag', None))]

            if out is None:
                out = self.range.element()
                out.real = result_parts[0]
                out.imag = result_parts[1]

            return out

        else:
            raise RuntimeError('bad domain {!r}'.format(self.domain))
739430
def _value(self, obj, cls=None):
        """"""
        if obj is not None:
            return getattr(obj, self.propname)
        else:
            return getattr(cls, self.propname)
1252644
def is_op(call, op):
    
    try:
        return call.id == op.id
    except Exception as e:
        return False
1205868
public void set( String name, Object value )
        throws EvalError
    {
        // map null to Primtive.NULL coming in...
        if ( value == null )
            value = Primitive.NULL;

        CallStack callstack = new CallStack();
        try {
            if ( Name.isCompound( name ) )
            {
                LHS lhs = globalNameSpace.getNameResolver( name ).toLHS(
                    callstack, this );
                lhs.assign( value, false );
            } else // optimization for common case
                globalNameSpace.setVariable( name, value, false );
        } catch ( UtilEvalError e ) {
            throw e.toEvalError( SimpleNode.JAVACODE, callstack );
        }
    }