Call `resolve` on the `object`'s `$ref` value if it has one.

    :param object: An object.
    :param resolve: A resolving function.
    :return: An object, or some other object! :sparkles:
548836
def maybe_resolve(object, resolve):
    
    if isinstance(object, dict) and object.get('$ref'):
        return resolve(object['$ref'])
    return object
960189
def resolve1(x, default=None):
    
    while isinstance(x, PDFObjRef):
        x = x.resolve(default=default)
    return x
568983
public Object resolveProperty(Object object, List<String> propertyNames) {
    // Always wrap base object.
    Object value = resolver.wrap(object);

    for (String propertyName : propertyNames) {
      if (value == null) {
        return null;
      }

      value = resolver.getValue(elContext, value, propertyName);
    }

    return value;
  }
438709
def resolve(self, ts):
        
        if isinstance(ts, six.string_types):
            ts = [ts]

        obj = self
        while len(ts) > 0:
            t = ts.pop(0)

            if issubclass(obj.__class__, BaseObj):
                obj = getattr(obj, t)
            elif isinstance(obj, list):
                obj = obj[int(t)]
            elif isinstance(obj, dict):
                obj = obj[t]

        return obj
1163141
def resolve(object):
    """"""


    import re
    sesame_cmd = 'curl -s http://cdsweb.u-strasbg.fr/viz-bin/nph-sesame/-oI?'+string.replace(object,' ','')
    f = os.popen(sesame_cmd)
    lines = f.readlines()
    f.close()
    for line in lines:        
        if re.search('%J ', line):
            result2 = line.split()
            ra_deg = float(result2[1])
            dec_deg = float(result2[2])
            return (ra_deg, dec_deg)
        
    return (0,0)
1169706
function(resolve) {
    var self = this.chain()

    // if .find(null) was called
    if (self.getInternal('exec_null')) {
      return Promise.resolve(null)
    }

    var relation = self.getInternal('relation')

    if (relation && typeof relation.loadWithCollection === 'function') {
      const promise = relation.loadWithCollection(self)
      if (promise && promise.then) return promise.then(resolve)
    }

    var dataLoaded = self.getInternal('data_loaded')
    var options = self.getExecOptions()
    var data = {}

    if (dataLoaded) data.result = dataLoaded

    return self
      .callInterceptors('beforeFind', [options])
      .then(function() {
        return self.callInterceptors('onFind', [options, data], {
          executeInParallel: true
        })
      })
      .then(function() {
        return self.callInterceptors('afterFind', [data])
      })
      .then(function() {
        if (typeof resolve === 'function') return resolve(data.result)
        return data.result
      })
  }
351993
def redef(obj, key, value, **kwargs):
    ''''''
    return Redef(obj, key, value=value, **kwargs)
1339346
def resolving(self, ref):
        
        # print u"resol_scope: %s, ref: %s" % (self.resolution_scope, ref)
        full_uri = urljoin(self.resolution_scope, ref)
        uri, fragment = urldefrag(full_uri)
        if not uri:
            uri = self.base_uri

        if uri in self.store:
            document = self.store[uri]
        else:
            if (uri.startswith(u"file") or uri.startswith(u"File")):
                try:
                    document = self.resolve_local(full_uri, self.resolution_scope, ref)
                except Exception as exc:
                    raise RefResolutionError(exc)
            else:

                try:
                    document = self.resolve_remote(uri)
                except Exception as exc:
                    raise RefResolutionError(exc)

        old_base_uri, self.base_uri = self.base_uri, uri
        try:
            with self.in_scope(uri):
                yield self.resolve_fragment(document, fragment)
        finally:
            self.base_uri = old_base_uri
331738
def _fill_scope_refs(name, scope):
        
        symbol = scope.resolve(name)
        if symbol is None:
            return

        orig_scope = symbol.scope
        scope.refs[name] = orig_scope
        while scope is not orig_scope:
            scope = scope.get_enclosing_scope()
            scope.refs[name] = orig_scope
169667
function resolveValues(obj) {
    var ret = {};
    return Promise.all(Object.keys(obj).map(function (k) {
        var val = (0, _promisify2['default'])(obj[k]);
        return val.then(function (v) {
            return ret[k] = v;
        });
    })).then(function () {
        return ret;
    });
}
824904
def parse_object_ref(ref)
      prefix = ref[1]
      ref = ref[0]
      # Let's make sure the value isn't nil. If it is, return the default Hash.
      return {} if ref.nil?
      class_name =
        if ref.respond_to?(:haml_object_ref)
          ref.haml_object_ref
        else
          underscore(ref.class)
        end
      ref_id =
        if ref.respond_to?(:to_key)
          key = ref.to_key
          key.join('_') unless key.nil?
        else
          ref.id
        end
      id = "#{class_name}_#{ref_id || 'new'}"
      if prefix
        class_name = "#{ prefix }_#{ class_name}"
        id = "#{ prefix }_#{ id }"
      end

      { 'id'.freeze => id, 'class'.freeze => class_name }
    end
180406
function resolveHandler(_ref4) {
  var action = _ref4.action;
  var type = _ref4.type;
  var payload = _ref4.payload;
  var error = _ref4.error;
  return _extends({}, action, { type: type, payload: payload, error: error });
}
137076
def _refs(obj, named, *ats, **kwds):
    '''
    '''
    if named:
        for a in ats:  # cf. inspect.getmembers()
            if hasattr(obj, a):
                yield _NamedRef(a, getattr(obj, a))
        if kwds:  # kwds are _dir2() args
            for a, o in _dir2(obj, **kwds):
                yield _NamedRef(a, o)
    else:
        for a in ats:  # cf. inspect.getmembers()
            if hasattr(obj, a):
                yield getattr(obj, a)
        if kwds:  # kwds are _dir2() args
            for _, o in _dir2(obj, **kwds):
                yield o
1357452
function resolveResolution (
  ref,
  resolver,
  bootedServices
) {
  const refParts = ref.split(':')
  return resolver(refParts, bootedServices)
}
1088131
function resolverMiddleware (resolver) {
  return function (req, res, next) {
    try {
      const { source, args, context, info } = req
      const nonCircularReq = _.omit(req, [ 'context' ])
      const ctx = _.assign({}, context, { req: nonCircularReq, res, next })
      const value = resolver(source, args, ctx, info)

      // return a resolved promise
      return Promise.resolve(value)
        .then(result => {
          req.result = result
          return next()
        })
        .catch(next)
    } catch (err) {
      return next(err)
    }
  }
}
294953
def resolve_object_number(self, ref):
        """"""

        if not isinstance(ref, ObjectNumber):
            on = ObjectNumber.parse(ref)
        else:
            on = ref

        ds_on = on.as_dataset

        return ds_on
795147
function resolve(opt) {
	if (Strategies.Base.isPrototypeOf(opt)) {
		return opt;
	} else if (_.isString(opt)) {
		let SerializerClass = getByName(opt);
		if (SerializerClass)
			return SerializerClass;
		else
			throw new BrokerOptionsError(`Invalid strategy type '${opt}'.`, { type: opt });

	} else if (_.isObject(opt)) {
		let SerializerClass = getByName(opt.type || "RoundRobin");
		if (SerializerClass)
			return SerializerClass;
		else
			throw new BrokerOptionsError(`Invalid strategy type '${opt.type}'.`, { type: opt.type });
	}

	return Strategies.RoundRobin;
}