def METHOD_NAME(cfg: Config):
    """Stops an environment."""
    if cfg.env == Environment.PROD:
        print("Operation aborted. This would bring down the site")
        print("If you know what you are doing, edit the code in bin/lib/cli/environment.py, function environment_stop")
    elif are_you_sure("stop environment", cfg):
        for asg in get_autoscaling_groups_for(cfg):
            group_name = asg["AutoScalingGroupName"]
            if asg["MinSize"] > 0:
                print(f"Skipping ASG {group_name} as it has a non-zero min size")
                continue
            prev = asg["DesiredCapacity"]
            if not prev:
                print(f"Skipping ASG {group_name} as it already zero desired capacity")
                continue
            print(f"Updating {group_name} to have desired capacity 0 (from {prev})")
            as_client.update_auto_scaling_group(AutoScalingGroupName=group_name, DesiredCapacity=0)