code: def set_filter(self, value, name=constants.STRING_FILTER, descriptor=constants.STRING_FILTER):
          
          value = value.encode(self._encoding) if isinstance(value, six.text_type) else value
          filter_set = c_uamqp.dict_value()
          filter_key = c_uamqp.symbol_value(name)
          filter_value = utils.data_factory(value, encoding=self._encoding)
          if value is not None and descriptor is not None:
              descriptor = c_uamqp.symbol_value(descriptor)
              filter_value = c_uamqp.described_value(descriptor, filter_value)
  
          filter_set[filter_key] = filter_value
          self._address.filter_set = filter_set
docs: Set a filter on the endpoint. Only one filter
          can be applied to an endpoint.
  
          :param value: The filter to apply to the endpoint. Set to None for a NULL filter.
          :type value: bytes or str or None
          :param name: The name of the filter. This will be encoded as
           an AMQP Symbol. By default this is set to b'apache.org:selector-filter:string'.
          :type name: bytes
          :param descriptor: The descriptor used if the filter is to be encoded as a described value.
           This will be encoded as an AMQP Symbol. By default this is set to b'apache.org:selector-filter:string'.
           Set to None if the filter should not be encoded as a described value.
          :type descriptor: bytes or None