code: def deep_getattr(obj, name):
      """
      Python getattr() for arbitrarily deep attributes
      Throws an AttributeError if bad attribute
      """
      return functools.reduce(getattr, name.split("."), obj)
  
imports: import functools
  import math
  import numbers
  import random
  import sys
  import timeit
  import warnings
  from collections import defaultdict
  from contextlib import contextmanager
  from itertools import zip_longest
  import numpy
  import torch
  from pyro.poutine.util import site_is_subsample
label_desc: Use image node_id 18 for calling a global function with example usage: deep_getattr(obj, name) and returns: functools