class_docstr: Unit tests for KerasLayer.
class_docstr_tok: ["Unit","tests","for","KerasLayer","."]
code: def test_keras_layer_fails_if_with_outputs_as_dict_but_no_signature(
      self,
  ):
      export_dir = os.path.join(
          self.get_temp_dir(), "saved_model_v2_mini"
      )
      _save_plus_one_saved_model_v2(export_dir, save_from_keras=False)
      with self.assertRaisesRegex(
          ValueError,
          "signature_outputs_as_dict is only valid if specifying a signature *",
      ):
          hub.KerasLayer(export_dir, signature_outputs_as_dict=True)
  
imports: import json
  import os
  from absl.testing import parameterized
  import numpy
  import tensorflow
  import tensorflow_hub
label_desc: Use image node_id 6 for calling the KerasLayerTest obj's underlying member method code with example usage: obj.test_keras_layer_fails_if_with_outputs_as_dict_but_no_signature() without return types