def METHOD_NAME(ec2_client, vpc_id, expected_internet_gateway_id):
    """Check that the vpc contains the given internet gateway."""
    if expected_internet_gateway_id:
        response = ec2_client.describe_internet_gateways(Filters=[{"Name": "attachment.vpc-id", "Values": [vpc_id]}])
        internet_gateway_id = response["InternetGateways"][0]["InternetGatewayId"]
        assert_that(internet_gateway_id).is_equal_to(expected_internet_gateway_id)