def _create_price_offering(
    client,
    header,
    description,
    final_url,
    final_mobile_url,
    price_in_micros,
    currency_code,
    unit,
):
    """Creates a PriceOffering instance and returns it.

    Args:
        client: an initialized GoogleAdsClient instance.
        header: The header of the price offering.
        description: The description of the price offering.
        final_url: The final_url of the price offering.
        final_mobile_url: The final_mobile_url of the price offering.
        price_in_micros: The price of the price offering.
        currency_code: The currency_code of the price offering.
        unit: The price unit of the price offering.

    Returns:
        A PriceOffering instance.
    """
    price_offering = client.get_type("PriceOffering")
    price_offering.header = header
    price_offering.description = description
    price_offering.final_url = final_url
    # Check if this exists, since we pass None for one of the PriceOfferings
    # in the _create_price_asset method and assigning None to this field
    # raises an error.
    if final_mobile_url:
        price_offering.final_mobile_url = final_mobile_url
    price_offering.price.amount_micros = price_in_micros
    price_offering.price.currency_code = currency_code
    price_offering.unit = unit
    return price_offering