code: async def query_available_abilities(
          self, units: Union[List[Unit], "Units"], ignore_resource_requirements: bool = False
      ) -> List[List[AbilityId]]:
          
          if not isinstance(units, list):
              """ Deprecated, accepting a single unit may be removed in the future, query a list of units instead """
              assert isinstance(units, Unit)
              units = [units]
              input_was_a_list = False
          else:
              input_was_a_list = True
          assert units
          result = await self._execute(
              query=query_pb.RequestQuery(
                  abilities=[query_pb.RequestQueryAvailableAbilities(unit_tag=unit.tag) for unit in units],
                  ignore_resource_requirements=ignore_resource_requirements,
              )
          )
          """ Fix for bots that only query a single unit """
          if not input_was_a_list:
              return [[AbilityId(a.ability_id) for a in b.abilities] for b in result.query.abilities][0]
          return [[AbilityId(a.ability_id) for a in b.abilities] for b in result.query.abilities]
docs: Query abilities of multiple units