def check_batch_limits(self, text_list, batch_size):
        if batch_size > MAX_BATCH_SIZE or batch_size < MIN_BATCH_SIZE:
            raise MonkeyLearnException('batch_size has to be between {0} and {1}'.format(
                                       MIN_BATCH_SIZE, MAX_BATCH_SIZE))
        if not text_list:
            raise MonkeyLearnException('The text_list can\'t be empty.')
        if '' in text_list:
            raise MonkeyLearnException('You have an empty text in position {0} in text_list'.format(
                                       text_list.index('')))
        for i, text in enumerate(text_list):
            if not isinstance(text, six.string_types):
                raise MonkeyLearnException(
                    'Element in position {0} in text_list must be a string.'.format(i)
                )
dataset/ETHPy150Open monkeylearn/monkeylearn-python/monkeylearn/utils.py/HandleErrorsMixin.check_batch_limits/original