def get_distinct(self, field, query=None):
        validation.check_choice(field, validation.DISTINCT_FIELDS)
        query is None or validation.check_query(query)  # TODO: normalize?

        result = set()
        futures = {b: b.library.get_distinct(field, query)
                   for b in self.backends.with_library.values()}
        for backend, future in futures.items():
            with _backend_error_handling(backend):
                values = future.get()
                if values is not None:
                    validation.check_instances(values, compat.text_type)
                    result.update(values)
        return result
List distinct values for a given field from the library.
dataset/ETHPy150Open mopidy/mopidy/mopidy/core/library.py/LibraryController.get_distinct