code: def get_network(name, batch_size=1, layout="NHWC"):
      """Get the symbol definition and random weight of a network"""
  
      # auto-scheduler prefer NHWC layout
      if layout == "NHWC":
          image_shape = (224, 224, 3)
      elif layout == "NCHW":
          image_shape = (3, 224, 224)
      elif layout == "NCDHW":
          image_shape = (3, 16, 224, 224)
      elif layout == "NDHWC":
          image_shape = (3, 224, 224, 16)
      else:
          raise ValueError("Invalid layout: " + layout)
  
      if name == "resnet-18":
          mod, params = relay.testing.resnet.get_workload(
              num_layers=18,
              batch_size=batch_size,
              layout=layout,
              image_shape=image_shape,
          )
      elif name == "resnet-50":
          mod, params = relay.testing.resnet.get_workload(
              num_layers=50,
              batch_size=batch_size,
              layout=layout,
              image_shape=image_shape,
          )
      elif name == "winograd-test":
          input_shape = [1, 23, 40, 32]
  
          data = relay.var("data", shape=input_shape, dtype="float32")
          net = relay.testing.layers.conv2d(
              data=data,
              channels=128,
              kernel_size=3,
              strides=1,
              padding=1,
              data_layout="NHWC",
              kernel_layout="HWIO",
              name="",
          )
          bias = relay.var("conv1_bias")
          net = relay.nn.bias_add(net, bias, 3)
          net = relay.nn.relu(net)
          mod, params = relay.testing.create_workload(net)
      elif name == "resnet3d-18":
          mod, params = relay.testing.resnet_3d.get_workload(
              num_layers=18,
              batch_size=batch_size,
              layout=layout,
              image_shape=image_shape,
          )
      elif name == "mobilenet":
          mod, params = relay.testing.mobilenet.get_workload(
              batch_size=batch_size,
              layout=layout,
              image_shape=image_shape,
          )
      elif name == "resnet3d-18":
          mod, params = relay.testing.resnet_3d.get_workload(
              num_layers=18,
              batch_size=batch_size,
              layout=layout,
              image_shape=image_shape,
          )
      elif name == "dcgan":
          mod, params = relay.testing.dcgan.get_workload(
              batch_size=batch_size, layout=layout
          )
      elif name == "mlp":
          data = relay.var("data", shape=(batch_size, 32))
          fc1 = relay.nn.dense(data, relay.var("fc1_weight"), units=32)
          fc1 = relay.nn.bias_add(fc1, relay.var("fc1_bias"), axis=-1)
          act1 = relay.nn.relu(fc1)
          fc2 = relay.nn.dense(act1, relay.var("fc2_weight"), units=32)
          fc2 = relay.nn.bias_add(fc2, relay.var("fc2_bias"), axis=-1)
          act2 = relay.nn.relu(fc2)
          mlp = act2
          args = relay.analysis.free_vars(act2)
          mlp = relay.Function(args, mlp)
          mod, params = relay.testing.init.create_workload(mlp)
      else:
          raise ValueError("Unsupported network: " + name)
  
      return mod, params
  
file_path: tvm/tests/python/relay/test_auto_scheduler_task_extraction.py
imports: import json
  import tempfile
  import pytest
  import tvm.relay.testing
  import tvm.testing
  from tvm import _ffi
  from tvm import auto_scheduler, relay
label_desc: Use image node_id 1 for calling a global function with example usage: get_network(name, batch_size, layout) and returns: mod,  params