code: def groups(self):
          
  
          # Split paths into components and take the first (group) component.
          object_paths = (
              path_components(path)
              for path in self.objects)
          group_names = (path[0] for path in object_paths if len(path) > 0)
  
          # Use an ordered dict as an ordered set to find unique
          # groups in order.
          groups_set = OrderedDict()
          for group in group_names:
              groups_set[group] = None
          return list(groups_set)
docs: Return the names of groups in the file
  
          Note that there is not necessarily a TDMS object associated with
          each group name.
  
          :rtype: List of strings.