code: def of_type(self, other: Union[UnitTypeId, Set[UnitTypeId], List[UnitTypeId], Dict[UnitTypeId, Any]]) -> "Units":
          
          # example: self.units.of_type([ZERGLING, ROACH, HYDRALISK, BROODLORD])
          if isinstance(other, UnitTypeId):
              other = {other}
          if isinstance(other, list):
              other = set(other)
          return self.filter(lambda unit: unit.type_id in other)
docs: Filters all units that are of a specific type