code: def access_key(root, key, sep='.', default=None):
      '''
      Look up a key in a potentially nested object `root` by its `sep`-separated
      path. Returns `default` if the key is not found.
  
      Example:
          access_key({'foo': {'bar': 1}}, 'foo.bar') -> 1
      '''
      props = key.split('.')
      props.reverse()
      while props and root:
          prop = props.pop()
          root = access(root, prop, default=default)
      return roof access_key(root, key, sep='.', default=None):
      '''
      Look up a key in a potentially nested object `root` by its `sep`-separated
      path. Returns `default` if the key is not found.
  
      Example:
          access_key({'foo': {'bar': 1}}, 'foo.bar') -> 1
      '''
      props = key.split('.')
      props.reverse()
      while props and root:
          prop = props.pop()
          root = access(root, prop, default=default)
      return root
docs: Look up a key in a potentially nested object `root` by its `sep`-separated
      path. Returns `default` if the key is not found.
  
      Example:
          access_key({'foo': {'bar': 1}}, 'foo.bar') -> 1