code: def __del__(self):
      if not self.shutdown:
          logger.debug("AWS EC2 keeps running")
          return
      to_stop = []
      try:
          for rid in self.used_resource:
              _, hostname, _, _ = parse_hostname(self.mapping[rid])
              if not _is_instance_id(hostname):
                  logger.info(
                      "Not AWS instance ID, won't stop %s", hostname
                  )
                  continue
              logger.debug("Stopping instance with name %s", hostname)
              instance = AWSRemote.verify(hostname)
              if instance.state["Name"] == "stopped":
                  logger.warning("instance is already stopped")
              else:
                  to_stop.append(hostname)
          AWSRemote.change_status(to_stop, target="stop")
          logger.info(
              "Following instances '%s' are stopped", ",".join(to_stop)
          )
      except Exception as e:
          logger.fatal(
              "Encounter error %s during shutdown, instances may not be stopped correctly",
              e,
          )
  
file_path: auptimizer/src/aup/EE/Resource/AWSResourceManager.py
imports: import logging
  import time
  import boto3
  import paramiko
  from botocore.exceptions import ClientError
  from .SSHResourceManager import SSHResourceManager, Remote, parse_hostname
label_desc: Use image node_id 2 for calling the AWSResourceManager obj's underlying member method code with example usage: obj.__del__() without return types