def CSA_motor_efficiency(P, closed=False, poles=2, high_efficiency=False):
    r'''Returns the efficiency of a NEMA motor according to [1]_.
    These values are standards, but are only for full-load operation.

    Parameters
    ----------
    P : float
        Power, [W]
    closed : bool, optional
        Whether or not the motor is enclosed
    poles : int, optional
        The number of poles of the motor
    high_efficiency : bool, optional
        Whether or not to look up the high-efficiency value

    Returns
    -------
    efficiency : float
        Guaranteed full-load motor efficiency, [-]

    Notes
    -----
    Criteria for being required to meet the high-efficiency standard is:

    * Designed for continuous operation
    * Operates by three-phase induction
    * Is a squirrel-cage or cage design
    * Is NEMA type A, B, or C with T or U frame; or IEC design N or H
    * Is designed for single-speed operation
    * Has a nominal voltage of less than 600 V AC
    * Has a nominal frequency of 60 Hz or 50/60 Hz
    * Has 2, 4, or 6 pole construction
    * Is either open or closed

    Pretty much every motor is required to meet the low-standard efficiency
    table, however.

    Several low-efficiency standard high power values were added to allow for
    easy programming; values are the last listed efficiency in the table.

    Examples
    --------
    >>> CSA_motor_efficiency(100*hp)
    0.93
    >>> CSA_motor_efficiency(100*hp, closed=True, poles=6, high_efficiency=True)
    0.95

    References
    ----------
    .. [1] Natural Resources Canada. Electric Motors (1 to 500 HP/0.746 to
       375 kW). As modified 2015-12-17.
       https://www.nrcan.gc.ca/energy/regulations-codes-standards/products/6885
    '''
    P = P/hp
    # This could be replaced by a dict and a jump list
    if high_efficiency:
        if closed:
            if poles == 2:
                efficiency = interp(P, nema_high_P, nema_high_full_closed_2p)
            elif poles == 4:
                efficiency = interp(P, nema_high_P, nema_high_full_closed_4p)
            elif poles == 6:
                efficiency = interp(P, nema_high_P, nema_high_full_closed_6p)
        else:
            if poles == 2:
                efficiency = interp(P, nema_high_P, nema_high_full_open_2p)
            elif poles == 4:
                efficiency = interp(P, nema_high_P, nema_high_full_open_4p)
            elif poles == 6:
                efficiency = interp(P, nema_high_P, nema_high_full_open_6p)
    else:
        if closed:
            if poles == 2:
                efficiency = interp(P, nema_min_P, nema_min_full_closed_2p)
            elif poles == 4:
                efficiency = interp(P, nema_min_P, nema_min_full_closed_4p)
            elif poles == 6:
                efficiency = interp(P, nema_min_P, nema_min_full_closed_6p)
            elif poles == 8:
                efficiency = interp(P, nema_min_P, nema_min_full_closed_8p)
        else:
            if poles == 2:
                efficiency = interp(P, nema_min_P, nema_min_full_open_2p)
            elif poles == 4:
                efficiency = interp(P, nema_min_P, nema_min_full_open_4p)
            elif poles == 6:
                efficiency = interp(P, nema_min_P, nema_min_full_open_6p)
            elif poles == 8:
                efficiency = interp(P, nema_min_P, nema_min_full_open_8p)
    
    return round(efficiency, 4)
r'''Returns the efficiency of a NEMA motor according to [1]_.
    These values are standards, but are only for full-load operation.

    Parameters
    ----------
    P : float
        Power, [W]
    closed : bool, optional
        Whether or not the motor is enclosed
    poles : int, optional
        The number of poles of the motor
    high_efficiency : bool, optional
        Whether or not to look up the high-efficiency value

    Returns
    -------
    efficiency : float
        Guaranteed full-load motor efficiency, [-]

    Notes
    -----
    Criteria for being required to meet the high-efficiency standard is:

    * Designed for continuous operation
    * Operates by three-phase induction
    * Is a squirrel-cage or cage design
    * Is NEMA type A, B, or C with T or U frame; or IEC design N or H
    * Is designed for single-speed operation
    * Has a nominal voltage of less than 600 V AC
    * Has a nominal frequency of 60 Hz or 50/60 Hz
    * Has 2, 4, or 6 pole construction
    * Is either open or closed

    Pretty much every motor is required to meet the low-standard efficiency
    table, however.

    Several low-efficiency standard high power values were added to allow for
    easy programming; values are the last listed efficiency in the table.

    Examples
    --------
    >>> CSA_motor_efficiency(100*hp)
    0.93
    >>> CSA_motor_efficiency(100*hp, closed=True, poles=6, high_efficiency=True)
    0.95

    References
    ----------
    .. [1] Natural Resources Canada. Electric Motors (1 to 500 HP/0.746 to
       375 kW). As modified 2015-12-17.
       https://www.nrcan.gc.ca/energy/regulations-codes-standards/products/6885