





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

import datasets
from datasets import Dataset

def 						_SCREAMING_SNAKE_CASE       ():
 lowerCAmelCase  							=      Dataset.from_dict({'col_1': [3, 2, 0, 1]}       )

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

  mock_tqdm.reset_mock()

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













"""simple docstring"""



from doctest import testmod
from math import sqrt


def      SCREAMING_SNAKE_CASE__    (   snake_case    :      int							)->						list:






     '''simple docstring'''



     UpperCAmelCase__		:  list[int]				=				[]
     if num < 1:
          return facs
     facs.append(1							)
     if num == 1:
          return facs
     facs.append(snake_case							)
     for i in range(2       , int(sqrt(snake_case							)							) + 1							):
          if num % i == 0:  # If i is a factor of num
               facs.append(snake_case							)
               UpperCAmelCase__		:  Any				=				num // i  # num//i is the other factor of num
               if d != i:  # If d and i are distinct
                    facs.append(snake_case							)  # we have found another factor
     facs.sort()
     return facs


if __name__ == "__main__":
 testmod(name="""factors_of_a_number""", verbose=True)


