code: def getValue(self, scalarExpression):
          
          return lock_and_call(
              lambda: Utils.castVariant(self._impl.getValue(scalarExpression)),
              self._lock
          )
docs: Get a scalar value from the underlying AMPL interpreter, as a double or
          a string.
  
          Args:
              scalarExpression: An AMPL expression which evaluates to a scalar
              value.
  
          Returns:
              The value of the expression.