def METHOD_NAME(self, indexed_block_names, factory_meta):
    if not indexed_block_names:
        # There were no declarations for this block, we will ultimately return an empty
        # StreamValue
        return
    indexes = sorted(indexed_block_names.keys())
    for declared, expected in zip_longest(indexes, range(max(indexes) + 1)):
        if declared != expected:
            raise InvalidDeclaration(
                f"Parameters for {factory_meta.factory} missing required index {expected}"
            )