<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _GetVal(self, obj, key):
 """Recurse down an attribute chain to the actual result data."""

    if "." in key:
      lhs, rhs = key.split(".", 1)
      obj2 = getattr(obj, lhs, None)
      if obj2 is None:
        return None
      return self._GetVal(obj2, rhs)
    else:
      return getattr(obj, key, None)