async def METHOD_NAME(self, client, index_name):
    fields = fields = [
        SimpleField(name="hotelId", type=SearchFieldDataType.String, key=True),
        SimpleField(name="baseRate", type=SearchFieldDataType.Double),
    ]
    scoring_profile = ScoringProfile(name="MyProfile")
    scoring_profiles = []
    scoring_profiles.append(scoring_profile)
    cors_options = CorsOptions(allowed_origins=["*"], max_age_in_seconds=60)
    index = SearchIndex(
        name=index_name, fields=fields, scoring_profiles=scoring_profiles, cors_options=cors_options
    )
    result = await client.create_index(index)
    assert result.name == "hotels"
    assert result.scoring_profiles[0].name == scoring_profile.name
    assert result.cors_options.allowed_origins == cors_options.allowed_origins
    assert result.cors_options.max_age_in_seconds == cors_options.max_age_in_seconds