def create_feature_with_api(
    client: APIClient,
    project_id: int,
    feature_name: str,
    initial_value: str,
    feature_type: str = STANDARD,
) -> int:
    """
    Create a feature against the API using the provided test client.

    :param client: DRF api client to use to make the request
    :param feature_name: Name of the feature to create
    :param initial_value: Initial value to give the feature
    :param multivariate_options: List of 2-tuples containing the string value and percentage allocation
    :return: id of the created feature
    """
    create_feature_url = reverse(
        "api-v1:projects:project-features-list", args=[project_id]
    )
    create_standard_feature_data = {
        "name": feature_name,
        "type": feature_type,
        "initial_value": initial_value,
        "default_enabled": True,
    }
    create_standard_feature_response = client.post(
        create_feature_url,
        data=json.dumps(create_standard_feature_data),
        content_type="application/json",
    )
    return create_standard_feature_response.json()["id"]  # type: ignore[no-any-return]

    Create a feature against the API using the provided test client.

    :param client: DRF api client to use to make the request
    :param feature_name: Name of the feature to create
    :param initial_value: Initial value to give the feature
    :param multivariate_options: List of 2-tuples containing the string value and percentage allocation
    :return: id of the created feature
    
api/tests/integration/helpers.py