code: def _lookup_consumer_tag_by_consumer(self, consumer):
          '''Look up consumer tag given its consumer function
  
          NOTE: this protected method may be called by derived classes
  
          :param callable consumer: consumer function
  
          :returns: matching consumer tag or None
          :rtype: str or None
          '''
          for (tag, func) in self._consumer_cb.iteritems():
              if func == consumer:
                  return taf _lookup_consumer_tag_by_consumer(self, consumer):
          '''Look up consumer tag given its consumer function
  
          NOTE: this protected method may be called by derived classes
  
          :param callable consumer: consumer function
  
          :returns: matching consumer tag or None
          :rtype: str or None
          '''
          for (tag, func) in self._consumer_cb.iteritems():
              if func == consumer:
                  return tag
docs: Look up consumer tag given its consumer function
  
          NOTE: this protected method may be called by derived classes
  
          :param callable consumer: consumer function
  
          :returns: matching consumer tag or None
          :rtype: str or None