code: def xpending(self, stream, group_name, start=None, stop=None, count=None,
                   consumer=None):
          
          # Returns: total pel messages, min id, max id, count
          ssc = [start, stop, count]
          ssc_count = len([v for v in ssc if v is not None])
          if ssc_count != 3 and ssc_count != 0:
              raise ValueError(
                  'Either specify non or all of the start/stop/count arguments'
              )
          if not any(ssc):
              ssc = []
  
          args = [stream, group_name] + ssc
          if consumer:
              args.append(consumer)
          return self.execute(b'XPENDING', *args)
docs: Get information on pending messages for a stream
  
          Returned data will vary depending on the presence (or not)
          of the start/stop/count parameters. For more details see:
          https://redis.io/commands/xpending
  
          :raises ValueError: if the start/stop/count parameters are only
                              partially specified