human
I wrote the below code

    if (not expression):
        return DEFAULT_SIZE
    if (type(expression) is unicode):
        expression = str(expression)
    def _match(exp, search=re.compile('^(\\d+){1}([KMGTkmgt][IiBb]){0,1}([Bb]){0,1}').search):
        return bool(search(exp))
    if _match(expression):
        unit = expression.translate(None, '1234567890.')
        num = int(expression.replace(unit, ''))
        unit = unit.lower()
        if ((unit == 'tb') or (unit == 't') or (unit == 'tib')):
            return TiB(num)
        elif ((unit == 'gb') or (unit == 'g') or (unit == 'gib')):
            return GiB(num)
        elif ((unit == 'mb') or (unit == 'm') or (unit == 'mib')):
            return MiB(num)
        elif ((unit == 'kb') or (unit == 'k') or (unit == 'kib')):
            return KiB(num)
        elif (unit == ''):
            return Byte(num)
        else:
            return DEFAULT_SIZE
    else:
        return DEFAULT_SIZE

What's a good function header?
assistant
#Here's a good function header.

def parse_num(expression):