code: def _init_net(self):
      net = caffe2_pb2.NetDef()
      net.name = "test-init-net"
      net.external_output[:] = ["A", "B"]
      net.op.extend(
          [
              core.CreateOperator(
                  "GivenTensorFill",
                  [],
                  ["A"],
                  shape=(2, 3),
                  values=np.zeros((2, 3), np.float32)
                  .flatten()
                  .tolist(),
              ),
              core.CreateOperator(
                  "GivenTensorFill",
                  [],
                  ["B"],
                  shape=(3, 4),
                  values=np.zeros((3, 4), np.float32)
                  .flatten()
                  .tolist(),
              ),
          ]
      )
      return net.SerializeToString()
  
file_path: pytorch/caffe2/python/predictor/predictor_test.py
imports: import unittest
  import numpy
  from caffe2.python import workspace, core
  from caffe2.proto import caffe2_pb2
label_desc: Use image node_id 3 for calling the TestPredictor obj's underlying member method code with example usage: obj._init_net() and returns: net