code: def types_of_specie(self):
          
          if not self.is_ordered:
              raise TypeError("""\
  types_of_species cannot be used with disordered structures and partial occupancies.
  Use OrderDisorderedStructureTransformation or EnumerateStructureTransformation
  to build an appropriate supercell from partial occupancies.""")
  
          # Cannot use set since we want a deterministic algorithm.
          types = []
          for site in self:
              if site.specie not in types:
                  types.append(site.specie)
          return types
docs: List of types of specie. Only works for ordered structures.
          Disordered structures will raise TypeError.