code: def find_layers(module, layers=[nn.Conv2d, nn.Linear], name=""):
      if type(module) in layers:
          return {name: module}
      res = {}
      for name1, child in module.named_children():
          res.update(
              find_layers(
                  child,
                  layers=layers,
                  name=name + "." + name1 if name != "" else name1,
              )
          )
      return res
  
label_desc: Use image node_id 1 for calling a global function with example usage: find_layers(module, layers, name) and returns: res, dict