code: def infer(self, context=None, **kwargs):
          
          if context is not None:
              context = context.extra_context.get(self, context)
          if self._explicit_inference is not None:
              # explicit_inference is not bound, give it self explicitly
              try:
                  # pylint: disable=not-callable
                  return self._explicit_inference(self, context, **kwargs)
              except exceptions.UseInferenceDefault:
                  pass
  
          if not context:
              return self._infer(context, **kwargs)
  
          key = (self, context.lookupname, context.callcontext, context.boundnode)
          if key in context.inferred:
              return iter(context.inferred[key])
  
          gen = context.cache_generator(key, self._infer(context, **kwargs))
          return util.limit_inference(gen, MANAGER.max_inferable_values)
docs: Get a generator of the inferred values.
  
          This is the main entry point to the inference system.
  
          .. seealso:: :ref:`inference`
  
          If the instance has some explicit inference function set, it will be
          called instead of the default interface.
  
          :returns: The inferred values.
          :rtype: iterable