def _get_name_descriptive(self):
		'Can probably fail with KeyError if something is really wrong with stream/device props.'
		ext, props = None, dict(
			(force_bytes(k), strip_noise_bytes(v, self.conf.broken_chars_replace))
			for k,v in self.props.viewitems() )

		if self.t == 'stream':
			if self.conf.use_media_name:
				name = props.get('media.name')
				if name and name not in self.conf.placeholder_media_names: return name
			try: name = props['application.name']
			except KeyError: # some synthetic stream with non-descriptive name
				name = self._get_name_unique(props['media.name'])
			ext = '({application.process.user}@'\
				'{application.process.host}:{application.process.id})'

		elif self.t == 'sink':
			if self.conf.use_device_name: name = self._prop_get('Name')
			else:
				name = props.get('alsa.id')\
					or props.get('device.description') or props.get('device.api')
				if not name:
					try: name = '{}.{}'.format(props['device.api'], props['device.string'])
					except KeyError:
						self._get_name_unique(props['device.description'])
				ext = '({device.profile.name}@{alsa.driver_name})'

		else: raise KeyError('Unknown menu-item type (for naming): {}'.format(self.t))

		if ext:
			try:
				name = '{} {}'.format( name,
					re.sub(r'\{([^}]+)\}', r'{}', ext).format(
						*op.itemgetter(*re.findall(r'\{([^}]+)\}', ext))(props) ) )
			except __HOLE__ as err:
				log.debug( 'Unable to get extended descriptive name'
					' (trype: %r, path: %s) due to missing key: %s', self.t, self.dbus_path, err )
		return name
dataset/ETHPy150Open mk-fg/pulseaudio-mixer-cli/pa-mixer-mk2.py/PAMixerMenuItem._get_name_descriptive