code: def test_get_epochs_number(test_input):
      args, epochs_expected = test_input
      with mock.patch.object(
          NNFastAiTabularModel,
          "_measure_batch_times",
          return_value=1.2732,
      ) as mock_method:
          # batches = (4000/256) + 1 = 16
          # est_epoch_time = 16 * 1.2732 = 20.371
          # time_left:45/est_epoch_time:20.371 = 2
          model = NNFastAiTabularModel()
          assert epochs_expected == model._get_epochs_number(
              4000, min_batches_count=4, **args
          )
          if "time_left" in args:
              if (
                  args.get("epochs", None) == "auto"
                  and args["batch_size"] * 4 <= 4000
              ):
                  mock_method.assert_called_with(4)
  
file_path: autogluon/tabular/tests/unittests/models/test_tabular_nn_fastai.py
imports: from unittest import mock
  import numpy
  import pytest
  from fastai.callback.core import CancelFitException
  from autogluon.tabular.models.fastainn.callbacks import BatchTimeTracker
  from autogluon.tabular.models.fastainn.tabular_nn_fastai import NNFastAiTabularModel
label_desc: Use image node_id 4 for calling a global function with example usage: test_get_epochs_number(test_input) without return types