code: def testShapes(self):
      fdef = self._build_function_def()
  
      g = function_def_to_graph.function_def_to_graph(fdef)
      self.assertIsNone(g.inputs[0].shape.dims)  # Unknown dims.
      self.assertIsNone(g.inputs[1].shape.dims)  # Unknown dims.
      self.assertIsNone(g.outputs[0].shape.dims)  # Unknown dims.
      self.assertIsNone(g.outputs[1].shape.dims)  # Unknown dims.
  
      g = function_def_to_graph.function_def_to_graph(
          fdef,
          input_shapes=[
              tensor_shape.TensorShape([5]),
              tensor_shape.TensorShape([5]),
          ],
      )
      self.assertSequenceEqual(g.inputs[0].shape.dims, [5])
      self.assertSequenceEqual(g.inputs[1].shape.dims, [5])
      self.assertSequenceEqual(g.outputs[0].shape.dims, [5])
      self.assertSequenceEqual(g.outputs[1].shape.dims, [5])
  
      g = function_def_to_graph.function_def_to_graph(
          fdef, input_shapes=[None, tensor_shape.TensorShape([5, 7])]
      )
      self.assertIsNone(g.inputs[0].shape.dims)
      self.assertSequenceEqual(g.inputs[1].shape.dims, [5, 7])
      self.assertSequenceEqual(g.outputs[0].shape.dims, [5, 7])
      self.assertSequenceEqual(g.outputs[1].shape.dims, [5, 7])
  
      # Should raise a ValueError if the length of input_shapes does not match
      # the number of input args in FunctionDef.signature.input_arg.
      with self.assertRaises(ValueError):
          g = function_def_to_graph.function_def_to_graph(
              fdef, input_shapes=[tensor_shape.TensorShape([5, 7])]
          )
  
imports: from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import function_def_to_graph
  from tensorflow.python.framework import graph_to_function_def
  from tensorflow.python.framework import op_def_library
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.framework import test_ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 3 for calling the FunctionDefToGraphTest obj's underlying member method code with example usage: obj.testShapes() without return types