<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def service_per_endpoint(self, context=None):
 """ List all endpoint this entity publishes and which service and binding that are behind the endpoint :param context: Type of entity :return: Dictionary with endpoint url as key and a tuple of service and binding as value """

        endps = self.getattr("endpoints", context)
        res = {}
        for service, specs in endps.items():
            for endp, binding in specs:
                res[endp] = (service, binding)
        return res