def init_fuel_tech_p_by(all_enduses_with_fuels, fueltypes_nr):
    """Helper function to define stocks for all enduse and fueltype

    Arguments
    ----------
    all_enduses_with_fuels : dict
        Provided fuels
    fueltypes_nr : int
        Nr of fueltypes

    Returns
    -------
    fuel_tech_p_by : dict

    """
    fuel_tech_p_by = {}

    fueltpe_dicts= dict.fromkeys(range(fueltypes_nr), {})

    for enduse in all_enduses_with_fuels:
        fuel_tech_p_by[enduse] = dict(fueltpe_dicts)

    return fuel_tech_p_by