def METHOD_NAME(block):
    # block structure verification
    header = BlockHeader()
    header.ParseFromString(block.header)
    if len(header.batch_ids) != len(set(header.batch_ids)):
        LOGGER.debug("Block has duplicate batches. Dropping block: %s",
                     block.header_signature)
        return False
    if not all(map(is_valid_batch, block.batches)):
        return False
    return True