code: def test_tensorflow_checkpoint():
      model = build_model()
      model.build(input_shape=(1,))
      preprocessor = DummyPreprocessor()
  
      checkpoint = TensorflowCheckpoint.from_model(
          model, preprocessor=preprocessor
      )
      assert checkpoint.get_model().get_weights() == model.get_weights()
  
      with checkpoint.as_directory() as path:
          checkpoint = TensorflowCheckpoint.from_directory(path)
          checkpoint_preprocessor = checkpoint.get_preprocessor()
          assert (
              checkpoint.get_model().get_weights()
              == model.get_weights()
          )
          assert checkpoint_preprocessor == preprocessor
  
imports: import re
  from typing import Tuple
  import numpy
  import pandas
  import pytest
  import tensorflow
  from ray.air.constants import MAX_REPR_LENGTH
  from ray.air.util.data_batch_conversion import _convert_batch_type_to_pandas, _convert_pandas_to_batch_type
  from ray.data.preprocessor import Preprocessor
  from ray.train.predictor import TYPE_TO_ENUM
  from ray.train.tensorflow import TensorflowCheckpoint, TensorflowPredictor
  from ray.train.tests.dummy_preprocessor import DummyPreprocessor
label_desc: Use image node_id 9 for calling a global function with example usage: test_tensorflow_checkpoint() without return types