code: def test_bigdl_pytorch_estimator_dataloader_creator(self):
      class SimpleModel(nn.Module):
          def __init__(self, momentum):
              super(SimpleModel, self).__init__()
              self.dense1 = nn.Linear(2, 4)
              self.bn1 = torch.nn.BatchNorm1d(4, momentum=momentum)
              self.dense2 = nn.Linear(4, 1)
  
          def forward(self, x):
              x = self.dense1(x)
              x = self.bn1(x)
              x = torch.sigmoid(self.dense2(x))
              return x
  
      def model_creator(config):
          model = SimpleModel(momentum=config.get("momentum", 0.1))
          return model
  
      estimator = Estimator.from_torch(
          model=model_creator,
          loss=nn.BCELoss(),
          metrics=[Accuracy()],
          optimizer=Adam(),
          config={"momentum": 0.9},
          backend="bigdl",
      )
  
      def get_dataloader(config, batch_size):
          inputs = torch.Tensor(
              [[1, 2], [1, 3], [3, 2], [5, 6], [8, 9], [1, 9]]
          )
          targets = torch.Tensor([[0], [0], [0], [1], [1], [1]])
          data_loader = torch.utils.data.DataLoader(
              TensorDataset(inputs, targets),
              batch_size=batch_size,
              num_workers=config.get("threads", 1),
          )
          return data_loader
  
      estimator.fit(
          data=get_dataloader,
          epochs=2,
          batch_size=2,
          validation_data=get_dataloader,
          checkpoint_trigger=EveryEpoch(),
      )
      estimator.evaluate(data=get_dataloader, batch_size=2)
      model = estimator.get_model()
      assert isinstance(model, nn.Module)
  
file_path: BigDL/python/orca/test/bigdl/orca/learn/jep/test_pytorch_estimator_for_spark_creator.py
imports: import os
  from unittest import TestCase
  import pytest
  import torch
  import torch.nn
  import torch.optim
  from torch.utils.data import TensorDataset
  from bigdl.orca import init_orca_context, stop_orca_context
  from bigdl.orca.learn.pytorch import Estimator
  from bigdl.orca.learn.metrics import Accuracy
  from bigdl.orca.learn.trigger import EveryEpoch
  from bigdl.orca.learn.optimizers import Adam
label_desc: Use image node_id 3 for calling the TestEstimatorForSparkCreator obj's underlying member method code with example usage: obj.test_bigdl_pytorch_estimator_dataloader_creator() and returns: model, data_loader, x