code: def same_unit(self, other: Union[UnitTypeId, Set[UnitTypeId], List[UnitTypeId], Dict[UnitTypeId, Any]]) -> "Units":
          
          if isinstance(other, UnitTypeId):
              other = {other}
          unit_alias_types = set(other)
          for unitType in other:
              unit_alias = self.game_data.units[unitType.value].unit_alias
              if unit_alias:
                  unit_alias_types.add(unit_alias)
          return self.filter(
              lambda unit: unit.type_id in unit_alias_types
              or unit._type_data.unit_alias is not None
              and unit._type_data.unit_alias in unit_alias_types
          )
docs: Usage:
          'self.units.same_tech(UnitTypeId.COMMANDCENTER)'
          returns CommandCenter and CommandCenterFlying,
          'self.units.same_tech(UnitTypeId.ORBITALCOMMAND)'
          returns OrbitalCommand and OrbitalCommandFlying
          This also works with a set/list/dict parameter, e.g. 'self.units.same_tech({UnitTypeId.COMMANDCENTER, UnitTypeId.SUPPLYDEPOT})'
          Untested: This should return the equivalents for WarpPrism, Observer, Overseer, SupplyDepot and others