Searchs and returns set of unique names of objects
    which implements MPRIS2 interfaces.

    :returns: set of unique names.
    :type: set
325849
def available_players():
    
    bus = dbus.SessionBus()
    players = set()
    for name in filter(lambda item: item.startswith(MPRIS_NAME_PREFIX),
                       bus.list_names()):
        owner_name = bus.get_name_owner(name)
        players.add(convert(owner_name))
    return players
644518
def _parse_interfaces(self):
        
        interfaces = dict()
        names = re.findall(r'^interface (Po.+)$', self.config, re.M)
        for name in names:
            config = self.get_block('interface %s' % name)
            match = re.search(r'mlag (\d+)', config)
            if match:
                interfaces[name] = dict(mlag_id=match.group(1))
        return dict(interfaces=interfaces)
642014
def get_implemented_interfaces(cls):
    
    if hasattr(cls, '__interfaces__'):
        return cls.__interfaces__
    return six.moves.reduce(
        lambda x, y: x.union(y),
        map(
            get_implemented_interfaces,
            inspect.getmro(cls)[1:]
        ),
        set()
    )
241731
def _remove_duplicates(objects):
    
    seen = {}
    result = []
    for item in objects:
        marker = id(item)
        if marker in seen:
            continue
        seen[marker] = 1
        result.append(item)
    return result
333425
def names(self):
        """"""
        ret = set()
        for arr in self:
            if isinstance(arr, InteractiveList):
                ret.update(arr.names)
            else:
                ret.add(arr.name)
        return ret
1331621
def get_search_names(name):
    
    parts = re.split('[-_.]', name)
    if len(parts) == 1:
        return parts

    result = set()
    for i in range(len(parts) - 1, 0, -1):
        for s1 in '-_.':
            prefix = s1.join(parts[:i])
            for s2 in '-_.':
                suffix = s2.join(parts[i:])
                for s3 in '-_.':
                    result.add(s3.join([prefix, suffix]))
    return list(result)
1054048
def unique_fields(self):
        
        return [(field_name, field_obj)
                for field_name, field_obj in self.declared_fields.items()
                if field_obj.unique]
1015199
private final Set<String> getNonSmokeAndMirrorsPropertyNameSet() {

        /* Get the names of all the properties in the JMS Property Maps */
        /* We need a copy so that we can add extra items, and so can the caller */
        Set<String> names = new HashSet<String>();

        // Add the names for the two flavours of properties, without creating lists
        // and maps unnecessarily.
        if (mayHaveJmsUserProperties()) {
            names.addAll(getJmsUserPropertyMap().keySet());
        }
        if (mayHaveMappedJmsSystemProperties()) {
            names.addAll(getJmsSystemPropertyMap().keySet());
        }

        // The MQMD properties may be in the JmsSystemPropertyMap AND the MQMSetPropertiesMap
        // however, the Set will cater for this as it doesn't allow duplicates.
        if (hasMQMDPropertiesSet()) {
            names.addAll(getMQMDSetPropertiesMap().keySet());
        }
        return names;
    }
431065
def _model_unique(ins):
    
    unique = []
    for t in ins.tables:
        for c in t.constraints:
            if isinstance(c, UniqueConstraint):
                unique.append(tuple(col.key for col in c.columns))
    return unique
621629
public synchronized Set<String> getNames() {
        if (map == null) {
            return Collections.emptySet();
        }
        return Collections.unmodifiableSet(map.keySet());
    }
1356615
def names(self) -> [str]:
        
        return sorted([name for name in self.axes_by_sname.keys() if name is not ''])
215375
def sharedInterfaces():
        
        def get(self):
            if not self.sharedInterfaceNames:
                return ()
            if self.sharedInterfaceNames == ALL_IMPLEMENTED_DB:
                I = implementedBy(self.sharedItem.__class__)
                L = list(I)
                T = tuple(L)
                return T
            else:
                return tuple(map(namedAny, self.sharedInterfaceNames.split(u',')))
        def set(self, newValue):
            self.sharedAttributeNames = _interfacesToNames(newValue)
        return get, set
630415
def get_inconsistent_fieldnames():
    
    field_name_list = []
    for fieldset_title, fields_list in settings.CONFIG_FIELDSETS.items():
        for field_name in fields_list:
            field_name_list.append(field_name)
    if not field_name_list:
        return {}
    return set(set(settings.CONFIG.keys()) - set(field_name_list))
8817
def groups(self):
        

        # Split paths into components and take the first (group) component.
        object_paths = (
            path_components(path)
            for path in self.objects)
        group_names = (path[0] for path in object_paths if len(path) > 0)

        # Use an ordered dict as an ordered set to find unique
        # groups in order.
        groups_set = OrderedDict()
        for group in group_names:
            groups_set[group] = None
        return list(groups_set)
1252595
public synchronized Collection<String> getPropertyNames() {
        if (properties == null) {
            return Collections.emptySet();
        }
        return Collections.unmodifiableSet(new HashSet<>(properties.keySet()));
    }
1248096
def unique_list(input_, key=lambda x:x):
    """"""
    seen = set()
    output = []
    for x in input_:
        keyx = key(x)
        if keyx not in seen:
            seen.add(keyx)
            output.append(x)
    return output
366360
def unique_deps(deps):
    """"""
    deps.sort()
    return list(k for k, _ in itertools.groupby(deps))