code: def create_modules(self, blocks):
      net_info = blocks[0]  # Info about model hyperparameters
      prev_filters, filters = 3, None
      output_filters, module_list = [], []
      ## module
      for index, x in enumerate(blocks[1:]):
          module_type = x["type"]
          module = []
          if module_type == "convolutional":
              try:
                  batch_normalize, bias = (
                      int(x["batch_normalize"]),
                      False,
                  )
              except:
                  batch_normalize, bias = 0, True
              # layer
              activation = x["activation"]
              filters = int(x["filters"])
              padding = int(x["pad"])
              pad = (int(x["size"]) - 1) // 2 if padding else 0
              module.append(
                  Conv2d(
                      prev_filters,
                      filters,
                      int(x["size"]),
                      int(x["stride"]),
                      pad,
                      bias=bias,
                  )
              )
              # BatchNorm2d
              if batch_normalize:
                  module.append(
                      BatchNorm2d(
                          filters, eps=1e-05, track_running_stats=True
                      )
                  )
              # LeakyReLU activation
              if activation == "leaky":
                  module.append(lambda x: x.leakyrelu(0.1))
          elif module_type == "maxpool":
              size, stride = int(x["size"]), int(x["stride"])
              module.append(
                  lambda x: x.max_pool2d(
                      kernel_size=(size, size), stride=stride
                  )
              )
          elif module_type == "upsample":
              module.append(
                  lambda x: Tensor(
                      x.numpy().repeat(2, axis=-2).repeat(2, axis=-1)
                  )
              )
          elif module_type == "route":
              x["layers"] = x["layers"].split(",")
              # Start of route
              start = int(x["layers"][0])
              # End if it exists
              try:
                  end = int(x["layers"][1])
              except:
                  end = 0
              if start > 0:
                  start -= index
              if end > 0:
                  end -= index
              module.append(lambda x: x)
              if end < 0:
                  filters = (
                      output_filters[index + start]
                      + output_filters[index + end]
                  )
              else:
                  filters = output_filters[index + start]
          # Shortcut corresponds to skip connection
          elif module_type == "shortcut":
              module.append(lambda x: x)
          elif module_type == "yolo":
              mask = list(map(int, x["mask"].split(",")))
              anchors = [int(a) for a in x["anchors"].split(",")]
              anchors = [
                  (anchors[i], anchors[i + 1])
                  for i in range(0, len(anchors), 2)
              ]
              module.append([anchors[i] for i in mask])
          # Append to module_list
          module_list.append(module)
          if filters is not None:
              prev_filters = filters
          output_filters.append(filters)
      return (net_info, module_list)
  
imports: import sys
  import io
  import time
  import math
  import cv2
  import numpy
  from PIL import Image
  from tinygrad.tensor import Tensor
  from tinygrad.nn import BatchNorm2d, Conv2d
  from tinygrad.helpers import fetch
label_desc: Use image node_id 2 for calling the Darknet obj's underlying member method code with example usage: obj.create_modules(blocks) and returns: net_info,  module_list