    def get_batch_size(self) -> Optional[int]:
        """
        Not all `BatchSamplers` define a consistent `batch_size`, but those that
        do should override this method.
        """
        return None
Not all `BatchSamplers` define a consistent `batch_size`, but those that
do should override this method.
allennlp/data/samplers/batch_sampler.py