code: def ids(self):
          
          ids = []
  
          try:
              ids.append(self.election_group_id)
          except ValueError:
              pass
  
          if isinstance(self.spec.subtypes, tuple):
              try:
                  ids.append(self.subtype_group_id)
              except ValueError:
                  pass
  
          if self.spec.can_have_orgs:
              try:
                  ids.append(self.organisation_group_id)
              except ValueError:
                  pass
  
          try:
              if self.ballot_id not in ids:
                  ids.append(self.ballot_id)
          except ValueError:
              pass
  
          return ids
docs: list[str]: All applicable IDs