def get_ref(record):
    """Get the name of a VPC, or its ID if it has no name.

    Args:

        record
            A VPC record returned by AWS.

    Returns:
        The VPC's name, or its ID if it has no name.

    """
    ref = record["VpcId"]
    tags = record.get("Tags")
    if tags:
        name_tags = [x for x in tags if x["Key"] == "Name"]
        if name_tags:
            ref = name_tags[0]["Value"]
    return ref