




'''simple docstring'''
from unittest.mock import patch

import datasets
from datasets import Dataset
def 							snake_case_    (  ):



    """simple docstring"""




    __lowercase     							=		Dataset.from_dict({"""col_1""": [3, 2, 0, 1]}     )

    with patch("""tqdm.auto.tqdm"""     ) as mock_tqdm:
        datasets.disable_progress_bar()
        dset.map(lambda a__     : {"col_2": x["col_1"] + 1}     )
        mock_tqdm.assert_not_called()

        mock_tqdm.reset_mock()

        datasets.enable_progress_bar()
        dset.map(lambda a__     : {"col_2": x["col_1"] + 1}     )
        mock_tqdm.assert_called()










'''simple docstring'''
def 							snake_case_    (  a__						:      int     ):



    """simple docstring"""




    __lowercase     							=		1
    __lowercase     							=		0
    __lowercase     							=		1
    __lowercase     							=		1
    __lowercase     							=		3
    __lowercase     							=		3
    __lowercase     							=		limit
    __lowercase     							=		0

    __lowercase     							=		""""""
    while counter != decimal + 1:
        if 4 * q + r - t < n * t:
            result += str(a__     )
            if counter == 0:
                result += "."

            if decimal == counter:
                break

            counter += 1
            __lowercase     							=		10 * (r - n * t)
            __lowercase     							=		((10 * (3 * q + r)) // t) - 10 * n
            q *= 10
            __lowercase     							=		nr
        else:
            __lowercase     							=		(2 * q + r) * l
            __lowercase     							=		(q * (7 * k) + 2 + (r * l)) // (t * l)
            q *= k
            t *= l
            l += 2
            k += 1
            __lowercase     							=		nn
            __lowercase     							=		nr
    return result
def 							snake_case_    (  ):



    """simple docstring"""




    print(f'{calculate_pi(50     ) = }'     )
    import doctest

    doctest.testmod()


if __name__ == "__main__":
  main()




