code: async def can_place(self, building: Union[AbilityData, AbilityId, UnitTypeId], position: Point2) -> bool:
          
  
          assert isinstance(building, (AbilityData, AbilityId, UnitTypeId))
  
          if isinstance(building, UnitTypeId):
              building = self._game_data.units[building.value].creation_ability
          elif isinstance(building, AbilityId):
              building = self._game_data.abilities[building.value]
  
          r = await self._client.query_building_placement(building, [position])
          return r[0] == ActionResult.Success
docs: Tests if a building can be placed in the given location.