def normalize_asg_success(success):
    count = "1"
    duration = "PT15M"

    # if it's falsy, return defaults
    if not success:
        return [count, duration]

    # if it's int, use as instance count
    if isinstance(success, int):
        return [str(success), duration]

    try:
        # try to parse as int
        count = int(success)
        # if it works, use as instance count
        return [success, duration]
    except __HOLE__:
        # ok did not work, try to parse
        if "within" in success:
            instance, time = success.split("within")
            return [instance.strip(), to_iso8601_duration(time.strip())]
        else:
            msg = 'Unknown ASG success requirement "{}". Use something like "1 within 10m".'
            raise click.UsageError(msg.format(success))
dataset/ETHPy150Open zalando-stups/senza/senza/components/auto_scaling_group.py/normalize_asg_success