code: def create_instances():
      """
      Creates EC2 Instance
      """
      print(_green("Started..."))
      print(_yellow("...Creating EC2 instance(s)..."))
  
      ec2_region = config.get(Config.AWS, Config.AWS_EC2_REGION)
      ec2_key = config.get(Config.AWS, Config.AWS_ACCESS_KEY)
      ec2_secret = config.get(Config.AWS, Config.AWS_SECRET_KEY)
      conn = boto.ec2.connect_to_region(
          ec2_region,
          aws_access_key_id=ec2_key,
          aws_secret_access_key=ec2_secret,
      )
  
      ec2_ami = config.get(Config.AWS, Config.AWS_EC2_AMI)
      image = conn.get_image(ec2_ami)
  
      ec2_key_pair = config.get(Config.AWS, Config.AWS_EC2_KEY_PAIR)
      ec2_instance_type = config.get(
          Config.AWS, Config.AWS_EC2_INSTANCE_TYPE
      )
      num_instances = config.get(Config.AWS, Config.AWS_NUM_INSTANCES)
      # must give num_instances twice because 1 min num and 1 max num
      reservation = image[0].run(
          num_instances,
          num_instances,
          key_name=ec2_key_pair,
          instance_type=ec2_instance_type,
      )
  
      while check_instances_pending(reservation.instances):
          print(_yellow("Instances still pending"))
          time.sleep(10)
  
      for instance in reservation.instances:
          print(_green("Instance state: %s" % instance.state))
          print(_green("Public dns: %s" % instance.public_dns_name))
  
file_path: ATM/fabfile.py
imports: from __future__ import print_function
  from fabric.api import *
  from fabric.colors import green, yellow
  import boto.ec2
  import time
  from atm.config import AWSConfig
label_desc: Use image node_id 3 for calling a global function with example usage: create_instances() without return types