def skip_7th_row(true_row, inv=False):
    """Utility function to skip the 7th row in periodic table, whose
    chemical elements are rare in the synthesis dataset."""
    if inv:
        if true_row >= 7:
            return true_row + 1
        return true_row
    if true_row >= 7:
        true_row -= 1
    return true_row