<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_service(self, service_type, service_endpoint=None, values=None):
 """ Add a service to the list of services on the DDO. :param service_type: Service :param service_endpoint: Service endpoint, str :param values: Python dict with serviceDefinitionId, templateId, serviceAgreementContract, list of conditions and consume endpoint. """

        if isinstance(service_type, Service):
            service = service_type
        else:
            service = Service(service_endpoint, service_type, values, did=self._did)
        logger.debug(f'Adding service with service type {service_type} with did {self._did}')
        self._services.append(service)