code: def test_register_text_input_callback(self):
      model = mock.Mock()
      model.embed_text_queries = mock.Mock(
          return_value=np.zeros((50, 512), dtype=np.int32)
      )
      model.get_scores = mock.Mock(
          return_value=(np.array([0, 1]), np.array([0.9, 0.0]))
      )
  
      colab_output = mock.Mock()
  
      interactive.register_text_input_callback(
          model=model,
          image=np.zeros((128, 64, 3), dtype=np.uint8),
          colab_output=colab_output,
      )
  
      name, callback = colab_output.register_callback.call_args[0]
  
      self.assertEqual(name, interactive.TEXT_INPUT_PY_CALLBACK_NAME)
  
      expected_callback_out = (
          '{"color_updates": [[0, "#ff0003ff"], [1, "#008cff00"]], '
          '"legend_text_b64": "UXVlcmllczogPHNwYW4gc3R5bGU9ImNvbG9yOiAjZmYwMDAzOy'
          "Bmb250LXNpemU6IDE0cHQ7IGZvbnQtd2VpZ2h0OiBib2xkOyI+cXVlcnkxPC9zcGFuPiwg"
          "PHNwYW4gc3R5bGU9ImNvbG9yOiAjMDA4Y2ZmOyBmb250LXNpemU6IDE0cHQ7IGZvbnQtd2"
          'VpZ2h0OiBib2xkOyI+cXVlcnkyPC9zcGFuPg=="}'
      )
      self.assertEqual(
          callback("query1, query2"), expected_callback_out
      )
  
file_path: scenic/scenic/projects/owl_vit/notebooks/tests/interactive_test.py
imports: from unittest import mock
  from absl.testing import absltest
  from bokeh.models import callbacks
  import numpy
  from scenic.projects.owl_vit.notebooks import interactive
label_desc: Use image node_id 1 for calling the InteractiveTest obj's underlying member method code with example usage: obj.test_register_text_input_callback() without return types