code: def add_subgroups(self, subgroups):
          
          if subgroups is None:
              subgroups = {}
          assert isinstance(subgroups, dict)
          self.subgroups.update(subgroups)
docs: Update the subgroups for this track.
  
          Note that in contrast to :meth:`CompositeTrack`, which takes a list of
          :class:`SubGroupDefinition` objects representing the allowed subgroups,
          this method takes a single dictionary indicating the particular
          subgroups for this track.
  
          Parameters
          ----------
  
          subgroups : dict
              Dictionary of subgroups, e.g., {'celltype': 'K562', 'treatment':
              'a'}.  Each key must match a SubGroupDefinition name in the
              composite's subgroups list.  Each value must match a key in that
              SubGroupDefinition.mapping dictionary.