def infer(self, context=None, **kwargs):
if context is not None:<EOL><INDENT>context = context.extra_context.get(self, context)<EOL><DEDENT>if self._explicit_inference is not None:<EOL><INDENT>try:<EOL><INDENT>return self._explicit_inference(self, context, **kwargs)<EOL><DEDENT>except exceptions.UseInferenceDefault:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>if not context:<EOL><INDENT>return self._infer(context, **kwargs)<EOL><DEDENT>key = (self, context.lookupname, context.callcontext, context.boundnode)<EOL>if key in context.inferred:<EOL><INDENT>return iter(context.inferred[key])<EOL><DEDENT>gen = context.cache_generator(key, self._infer(context, **kwargs))<EOL>return util.limit_inference(gen, MANAGER.max_inferable_values)<EOL>
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