code: def benchmark(self):
      batch_size = self.input_tensors[0][0].shape[0]
  
      for i in tqdm(
          range(self.n_warmup),
          desc=f"Performing warm up on {self.n_warmup} iterations",
      ):
          with tf.device(self.device.to_tf_format()):
              self.model(
                  *self.input_tensors[
                      i % min(self.n_warmup, len(self.input_tensors))
                  ]
              )
  
      timings = []
      for i in tqdm(
          range(1, self.n_runs + 1),
          desc=f"Performing benchmark on {self.n_runs} iterations",
      ):
          start_time = time.time()
          with tf.device(self.device.to_tf_format()):
              self.model(
                  *self.input_tensors[
                      i % min(self.n_runs, len(self.input_tensors))
                  ]
              )
  
          end_time = time.time()
          timings.append(end_time - start_time)
  
      print(f"Batch size: {batch_size}")
  
      throughput = batch_size / np.mean(timings)
      latency = np.mean(timings) / batch_size
  
      print("Average Throughput: %.2f data/second" % throughput)
      print("Average Latency: %.4f seconds/data" % latency)
  
      return throughput, latency
  
imports: import time
  from abc import abstractmethod, ABC
  from typing import Any, Dict, Type
  import numpy
  from loguru import logger
  from tqdm import tqdm
  from nebullvm.core.models import DeepLearningFramework, ModelParams, DeviceType
  from nebullvm.operations.inference_learners.base import BaseInferenceLearner
  from nebullvm.optional_modules.tensorflow import tensorflow
  from nebullvm.optional_modules.torch import torch, DataLoader
  from nebullvm.tools.data import DataManager
  from nebullvm.tools.onnx import create_model_inputs_onnx
  from nebullvm.tools.pytorch import create_model_inputs_torch
  from nebullvm.tools.tf import create_model_inputs_tf
  from nebullvm.tools.utils import check_input_data, extract_info_from_data, is_data_subscriptable, check_device
label_desc: Use image node_id 1 for calling the TensorflowBenchmark obj's underlying member method code with example usage: obj.benchmark() and returns: throughput,  latency