def limit_instance_count(self, instances):
        return max(
            self.get_min_instances(),
            min(self.get_max_instances(), instances),
        )
Returns param instances if it is between min_instances and max_instances.
dataset/ETHPy150Open Yelp/paasta/paasta_tools/marathon_tools.py/MarathonServiceConfig.limit_instance_count