Printable International Mobile Station Equipment Identity (IMEI) numbers.

    :param number: string or int

    >>> print(imei(12345678901234))
    12-345678-901234-7
    >>> print(imei(1234567890123456))
    12-345678-901234-56

def imei(number):
    '''
    Printable International Mobile Station Equipment Identity (IMEI) numbers.

    :param number: string or int

    >>> print(imei(12345678901234))
    12-345678-901234-7
    >>> print(imei(1234567890123456))
    12-345678-901234-56
    '''
    number = to_decimal(number)
    length = len(number)
    if length not in (14, 15, 16):
        raise ValueError(
            _('Invaid International Mobile Station Equipment Identity')
        )

    if len(number) == 14:
        # Add Luhn check digit
        number = luhn_append(number)

    groups = (number[:2], number[2:8], number[8:14], number[14:])
    return u'-'.join(list(filter(None, groups)))