code: def test_model(self, model_name: str):
      # Create an input with base64 encoded image.
      input_1 = {
          "image": np.zeros(
              shape=(mobilenet.IMAGE_SHAPE), dtype=np.float32
          )
      }
      # Create an input with image data in Numpy array.
      pil_image = PILImage.new(mode="RGB", size=(300, 200))
      input_2 = {
          "image": image_utils.convert_pil_to_image_str(pil_image)
      }
      model = mobilenet.MobileNet(model_name)
      model_out = model.predict([input_1, input_2])
      model_out = list(model_out)
      # Check first output.
      self.assertIn("preds", model_out[0])
      self.assertIn("grads", model_out[0])
      # Check second output.
      self.assertIn("preds", model_out[1])
      self.assertIn("grads", model_out[1])
  
file_path: lit/lit_nlp/examples/models/mobilenet_test.py
imports: from absl.testing import absltest
  from absl.testing import parameterized
  from lit_nlp.api import dataset
  from lit_nlp.api import types
  from lit_nlp.examples.models import mobilenet
  from lit_nlp.lib import image_utils
  import numpy
  from PIL import Image
label_desc: Use image node_id 2 for calling the MobileNetTest obj's underlying member method code with example usage: obj.test_model(model_name) without return types