<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def build_metadata_service(did, metadata, service_endpoint):
 """ Build a metadata service. :param did: DID, str :param metadata: conforming to the Metadata accepted by Ocean Protocol, dict :param service_endpoint: identifier of the service inside the asset DDO, str :return: Service """

        return Service(service_endpoint,
                       ServiceTypes.METADATA,
                       values={'metadata': metadata},
                       did=did)