code: def _del_nested_attr(obj: nn.Module, names: List[str]) -> None:
      """
      Deletes the attribute specified by the given list of names.
      For example, to delete the attribute obj.conv.weight,
      use _del_nested_attr(obj, ['conv', 'weight'])
      """
      if len(names) == 1:
          delattr(obj, names[0])
      else:
          _del_nested_attr(getattr(obj, names[0]), names[1:])
  
file_path: pytorch/benchmarks/functional_autograd_benchmark/utils.py
imports: from collections import defaultdict
  from typing import Callable, Dict, List, Tuple, Union
  import torch
  from torch import nn, Tensor
label_desc: Use image node_id 1 for calling a global function with example usage: _del_nested_attr(obj, names) without return types