def get_skill(sim_info: SimInfo,
               skill_id: int,
               add: bool = True) -> Union[Skill, None]:
     """ Retrieve a Skill for the specified Sim. """
     return CommonSimStatisticUtils.get_statistic(sim_info,
                                                  skill_id,
                                                  add=add)
 def is_at_max_skill_level(sim_info: SimInfo, skill_id: int) -> bool:
     """ Determine if a Sim has reached the Maximum Level of a Skill. """
     from statistics.skill import Skill
     statistic: Skill = CommonSimStatisticUtils.get_statistic(
         sim_info, skill_id)
     if statistic is None:
         return False
     return statistic.reached_max_level
    def get_skill(sim_info: SimInfo, skill_id: int, add: bool=True) -> Union[Skill, None]:
        """get_skill(sim_info, skill_id, add=True)

        Retrieve a Skill for the specified Sim.

        :param sim_info: The Sim to check.
        :type sim_info: SimInfo
        :param skill_id: The identifier of the Skill to use.
        :type skill_id: int
        :param add: If True, the skill will be added to the Sim before it is checked.
        :type add: bool, optional
        :return: An instance of a Skill of the Sim or None if the Skill does not exist.
        :rtype: Union[Skill, None]
        """
        return CommonSimStatisticUtils.get_statistic(sim_info, skill_id, add=add)
    def is_at_max_skill_level(sim_info: SimInfo, skill_id: int) -> bool:
        """is_at_max_skill_level(sim_info, skill_id)

        Determine if a Sim has reached the Maximum Level of a Skill.

        .. note:: Max level depends on the skill itself. Each skill can have a different max level.

        :param sim_info: The Sim to check.
        :type sim_info: SimInfo
        :param skill_id: The identifier of the Skill to check.
        :type skill_id: int
        :return: True, if the Sim has the skill at the maximum level. False, if the Sim does not.
        :rtype: bool
        """
        from statistics.skill import Skill
        statistic: Skill = CommonSimStatisticUtils.get_statistic(sim_info, skill_id)
        if statistic is None:
            return False
        return statistic.reached_max_level