code: def test_merge_graph_defs_function(self):
      expected_proto = """
              library {
                function {
                  signature {
                    name: "graph_1_foo"
                    input_arg {
                      name: "x"
                      type: DT_HALF
                    }
                    output_arg {
                      name: "identity"
                      type: DT_HALF
                    }
                  }
                  node_def {
                    name: "add"
                    op: "Add"
                    input: "x"
                    input: "y"
                  }
                }
                function {
                  signature {
                    name: "graph_2_foo"
                    input_arg {
                      name: "x"
                      type: DT_INT32
                    }
                    output_arg {
                      name: "identity"
                      type: DT_INT32
                    }
                  }
                  node_def {
                    name: "add"
                    op: "Add"
                    input: "x"
                    input: "y"
                  }
                }
                function {
                  signature {
                    name: "graph_2_foo_1"
                    input_arg {
                      name: "x"
                      type: DT_HALF
                    }
                    output_arg {
                      name: "identity"
                      type: DT_HALF
                    }
                  }
                  node_def {
                    name: "add"
                    op: "Add"
                    input: "x"
                    input: "y"
                  }
                }
              }
          """
  
      graph_def_a = GraphDef()
      text_format.Parse(
          """
                  library {
                    function {
                      signature {
                        name: "foo"
                        input_arg {
                          name: "x"
                          type: DT_HALF
                        }
                        output_arg {
                          name: "identity"
                          type: DT_HALF
                        }
                      }
                      node_def {
                        name: "add"
                        op: "Add"
                        input: "x"
                        input: "y"
                      }
                    }
                  }
              """,
          graph_def_a,
      )
  
      graph_def_b = GraphDef()
      text_format.Parse(
          """
                  library {
                    function {
                      signature {
                        name: "foo"
                        input_arg {
                          name: "x"
                          type: DT_INT32
                        }
                        output_arg {
                          name: "identity"
                          type: DT_INT32
                        }
                      }
                      node_def {
                        name: "add"
                        op: "Add"
                        input: "x"
                        input: "y"
                      }
                    }
                    function {
                      signature {
                        name: "foo_1"
                        input_arg {
                          name: "x"
                          type: DT_HALF
                        }
                        output_arg {
                          name: "identity"
                          type: DT_HALF
                        }
                      }
                      node_def {
                        name: "add"
                        op: "Add"
                        input: "x"
                        input: "y"
                      }
                    }
                  }
              """,
          graph_def_b,
      )
  
      self.assertProtoEquals(
          expected_proto,
          graph_util.merge_graph_defs([graph_def_a, graph_def_b]),
      )
  
file_path: tensorboard/tensorboard/plugins/graph/graph_util_test.py
imports: from google.protobuf import text_format
  import tensorflow
  from tensorboard.compat.proto.graph_pb2 import GraphDef
  from tensorboard.plugins.graph import graph_util
label_desc: Use image node_id 3 for calling the GraphUtilTest obj's underlying member method code with example usage: obj.test_merge_graph_defs_function() without return types