def imean(nums):
if len(nums) == <NUM_LIT:1>:<EOL><INDENT>return nums[<NUM_LIT:0>]<EOL><DEDENT>if len(nums) > <NUM_LIT:2>:<EOL><INDENT>raise AttributeError('<STR_LIT>')<EOL><DEDENT>if nums[<NUM_LIT:0>] <= <NUM_LIT:0> or nums[<NUM_LIT:1>] <= <NUM_LIT:0>:<EOL><INDENT>return float('<STR_LIT>')<EOL><DEDENT>elif nums[<NUM_LIT:0>] == nums[<NUM_LIT:1>]:<EOL><INDENT>return nums[<NUM_LIT:0>]<EOL><DEDENT>return (<NUM_LIT:1> / math.e) * (nums[<NUM_LIT:0>] ** nums[<NUM_LIT:0>] / nums[<NUM_LIT:1>] ** nums[<NUM_LIT:1>]) ** (<EOL><NUM_LIT:1> / (nums[<NUM_LIT:0>] - nums[<NUM_LIT:1>])<EOL>)<EOL>
r"""Return identric (exponential) mean.

    The identric mean of two numbers x and y is:
    x if x = y
    otherwise :math:`\frac{1}{e} \sqrt[x-y]{\frac{x^x}{y^y}}`

    Cf. https://en.wikipedia.org/wiki/Identric_mean

    Parameters
    ----------
    nums : list
        A series of numbers

    Returns
    -------
    float
        The identric mean of nums

    Raises
    ------
    AttributeError
        imean supports no more than two values

    Examples
    --------
    >>> imean([1, 2])
    1.4715177646857693
    >>> imean([1, 0])
    nan
    >>> imean([2, 4])
    2.9430355293715387