def average(numbers, numtype='<STR_LIT:float>'):
if type == '<STR_LIT>':<EOL><INDENT>return Decimal(sum(numbers)) / len(numbers)<EOL><DEDENT>else:<EOL><INDENT>return float(sum(numbers)) / len(numbers)<EOL><DEDENT>
Calculates the average or mean of a list of numbers

Args:
    numbers: a list of integers or floating point numbers.

    numtype: string, 'decimal' or 'float'; the type of number to return.

Returns:
    The average (mean) of the numbers as a floating point number
    or a Decimal object.

Requires:
    The math module