code: def get_estimator(workers_per_node=2, model_fn=model_creator):
      estimator = Estimator.from_keras(
          model_creator=model_fn,
          config={"lr": 1e-3},
          workers_per_node=workers_per_node,
          backend="ray",
      )
      return estimator
  
file_path: BigDL/python/orca/test/bigdl/orca/learn/ray/ctx/test_tf2_ray_dataset.py
imports: import pytest
  from unittest import TestCase
  import ray
  from ray.data import Dataset
  import tensorflow
  from bigdl.orca.learn.tf2 import Estimator
  from bigdl.orca import init_orca_context, stop_orca_context
label_desc: Use image node_id 6 for calling a global function with example usage: get_estimator(workers_per_node, model_fn) and returns: estimator