code: def get(obj, path, view=False, afilter=None):
      
      index = 0
      path_count = len(path) - 1
      target = obj
      head = type(target)()
      tail = head
      up = None
      for pair in path:
          key = pair[0]
          target = target[key]
  
          if view:
              if isinstance(tail, MutableMapping):
                  if issubclass(pair[1], (MutableSequence, MutableMapping)) and index != path_count:
                      tail[key] = pair[1]()
                  else:
                      tail[key] = target
                  up = tail
                  tail = tail[key]
              elif issubclass(tail.__class__, MutableSequence):
                  if issubclass(pair[1], (MutableSequence, MutableMapping)) and index != path_count:
                      tail.append(pair[1]())
                  else:
                      tail.append(target)
                  up = tail
                  tail = tail[-1]
  
          if not issubclass(target.__class__, (MutableSequence, MutableMapping)):
              if (afilter and (not afilter(target))):
                  raise dpath.exceptions.FilteredValue
  
          index += 1
  
      if view:
          return head
      else:
          return target
docs: Get the value of the given path.
  
      Arguments:
  
      obj -- Object to look in.
      path -- A list of keys representing the path.
  
      Keyword Arguments:
  
      view -- Return a view of the object.