@get_or_create(get_igw)
def create_igw(client, tag_name, vpc):
    "Method to create Internet Gateway based on tag_name in given VPC. If the gateway\n    already exists, it would return that object. If the object doesn't have a tag, we\n    would tag it accordingly.\n    Args:\n        client (boto client): Region specific boto client\n        tag_name (str): Tag name for internet gateway.\n        vpc (VPC object): VPC object to create Internet Gateway\n    Returns:\n        internet gateway: newly internet gateway object.\n    "
    existing_igw = next(iter(vpc.internet_gateways.all()), None)
    if (existing_igw is not None):
        tag_resource_name(client, existing_igw.id, tag_name)
        return existing_igw
    igw = client.create_internet_gateway()
    tag_resource_name(client, igw.id, tag_name)
    vpc.attach_internet_gateway(InternetGatewayId=igw.id)
    return igw
Method to create Internet Gateway based on tag_name in given VPC. If the gateway
already exists, it would return that object. If the object doesn't have a tag, we
would tag it accordingly.
Args:
    client (boto client): Region specific boto client
    tag_name (str): Tag name for internet gateway.
    vpc (VPC object): VPC object to create Internet Gateway
Returns:
    internet gateway: newly internet gateway object.
@get_or_create(get_igw)
def create_igw(client, tag_name, vpc):
    "Method to create Internet Gateway based on tag_name in given VPC. If the gateway\n    already exists, it would return that object. If the object doesn't have a tag, we\n    would tag it accordingly.\n    Args:\n        client (boto client): Region specific boto client\n        tag_name (str): Tag name for internet gateway.\n        vpc (VPC object): VPC object to create Internet Gateway\n    Returns:\n        internet gateway: newly internet gateway object.\n    "
    existing_igw = next(iter(vpc.internet_gateways.all()), None)
    if (existing_igw is not None):
        tag_resource_name(client, existing_igw.id, tag_name)
        return existing_igw
    igw = client.create_internet_gateway()
    tag_resource_name(client, igw.id, tag_name)
    vpc.attach_internet_gateway(InternetGatewayId=igw.id)
    return igw