def _is_logging_required(example_index, number_of_examples):
    """Returns True only if logging is required.

    Logging is performed after 10%, 20%, ... 100% percents of examples
    is processed.
    """
    return (example_index + 1) % max(1, number_of_examples // 10) == 0