<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def extract_report_spec( service, label_is_supported=label_descriptor.KnownLabels.is_supported, metric_is_supported=metric_descriptor.KnownMetrics.is_supported):
 """Obtains the used logs, metrics and labels from a service. label_is_supported and metric_is_supported are filter functions used to determine if label_descriptors or metric_descriptors found in the service are supported. Args: service (:class:`endpoints_management.gen.servicecontrol_v1_messages.Service`):
 a service instance label_is_supported (:func):
 determines if a given label is supported metric_is_supported (:func):
 determines if a given metric is supported Return: tuple: ( logs (set[string}), # the logs to report to metrics (list[string]), # the metrics to use labels (list[string]) # the labels to add ) """

    resource_descs = service.monitoredResources
    labels_dict = {}
    logs = set()
    if service.logging:
        logs = _add_logging_destinations(
            service.logging.producerDestinations,
            resource_descs,
            service.logs,
            labels_dict,
            label_is_supported
        )
    metrics_dict = {}
    monitoring = service.monitoring
    if monitoring:
        for destinations in (monitoring.consumerDestinations,
                             monitoring.producerDestinations):
            _add_monitoring_destinations(destinations,
                                         resource_descs,
                                         service.metrics,
                                         metrics_dict,
                                         metric_is_supported,
                                         labels_dict,
                                         label_is_supported)
    return logs, metrics_dict.keys(), labels_dict.keys()