def _IsLeafList(obj):
  """Return True if `obj` is a list of non-compound values.

  Since we are traversing a C structure, we assume elements in its list-type
  member variable are homogeneous, therefore we only test for its first element.

  Args:
    obj: The list to check.

  Returns:
    True if `obj` is a list of non-compound values.
  """

  if not obj:
    return True
  else:
    return not isinstance(obj[0], (dict, list, set, tuple))