<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def infer_call_result(self, caller, context=None):
 """infer what a class is returning when called"""

        if (
            self.is_subtype_of("%s.type" % (BUILTINS,), context)
            and len(caller.args) == 3
        ):
            result = self._infer_type_call(caller, context)
            yield result
            return

        dunder_call = None
        try:
            metaclass = self.metaclass(context=context)
            if metaclass is not None:
                dunder_call = next(metaclass.igetattr("__call__", context))
        except exceptions.AttributeInferenceError:
            pass
        if dunder_call and dunder_call.qname() != "builtins.type.__call__":
            context = contextmod.bind_context_to_node(context, self)
            yield from dunder_call.infer_call_result(caller, context)
        else:
            # Call type.__call__ if not set metaclass
            # (since type is the default metaclass)
            yield bases.Instance(self)