def METHOD_NAME(s):
    """
    s: <number>[<k|m|g|t>]
    Returns the number of bytes.
    """
    try:
        if s[-1].isdigit():
            return int(s)
        n, unit = float(s[0:-1]), s[-1].lower()
        if unit == 'k':
            return int(n * 1024)
        if unit == 'm':
            return int(n * 1024 * 1024)
        if unit == 'g':
            return int(n * 1024 * 1024 * 1024)
        if unit == 't':
            return int(n * 1024 * 1024 * 1024 * 1024)
    except (IndexError, ValueError):
        pass  # continue to next line and throw error
    raise ValueError('Invalid size: %s, expected <number>[<k|m|g|t>]' % s)