code: def list_blocks_of_type(self, blocktype, size):
          
  
          blocktype = snap7.snap7types.block_types.get(blocktype)
  
          if not blocktype:
              raise Snap7Exception("The blocktype parameter was invalid")
  
          logger.debug("listing blocks of type: %s size: %s" %
                        (blocktype, size))
  
          if (size == 0):
              return 0
  		
          data = (c_uint16 * size)()
          count = c_int(size)
          result = self.library.Cli_ListBlocksOfType(
              self.pointer, blocktype,
              byref(data),
              byref(count))
  
          logger.debug("number of items found: %s" % count)
  
          check_error(result, context="client")
          return data
docs: This function returns the AG list of a specified block type.