def _create_youtube_video_asset(
    client, customer_id, youtube_video_id, youtube_video_name
):
    """Creates a asset with the given YouTube video ID and name.

    Args:
        client: an initialized GoogleAdsClient instance.
        customer_id: a client customer ID str.
        youtube_video_id: a str of a YouTube video ID.
        youtube_video_name: a str to use for the name of the video asset.

    Returns:
        an Asset.
    """
    asset_operation = client.get_type("AssetOperation")
    asset = asset_operation.create
    asset.name = youtube_video_name
    asset.type_ = client.get_type("AssetTypeEnum").AssetType.YOUTUBE_VIDEO
    asset.youtube_video_asset.youtube_video_id = youtube_video_id

    asset_service = client.get_service("AssetService")
    response = asset_service.mutate_assets(
        customer_id=customer_id, operations=[asset_operation]
    )
    resource_name = response.results[0].resource_name
    print(
        "A new YouTube video asset has been added with resource name: "
        f"'{resource_name}'"
    )
    return resource_name
    # [END add_local_campaign_5]