class_docstr: Test ObjectDetectionWithMatchingModel.
class_docstr_tok: ["Test","ObjectDetectionWithMatchingModel","."]
docstr: Helper function to assert that `loss` is of shape [] and `is_valid`.
docstr_tok: ["Helper","function","to","assert","that","`","loss","`","is","of","shape","[","]","and","`","is_valid","`","."]
code: def is_valid_loss(self, loss):
      """Helper function to assert that `loss` is of shape [] and `is_valid`."""
      self.assertSequenceEqual(loss.shape, [])
      self.is_valid(loss)
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  from flax import jax_utils
  import jax
  import jax.numpy
  import ml_collections
  import numpy
  from scenic.projects.baselines.detr import detr_base_model
label_desc: Use image node_id 2 for calling the TestObjectDetectionWithMatchingModel obj's underlying member method code with example usage: obj.is_valid_loss(loss) without return types