parameters: (line)
return_statement: return math.trunc(byte)
docstring: Parse byte string into integer.
docstring_summary: Parse byte string into integer.
docstring_tokens: Parse byte string into integer .
function: def str_to_byte(line):
    """Parse byte string into integer."""
    parts = line.split(' ')
    byte = float(parts[0])
    unit = parts[1]
    if unit == 'B':
      byte *= 1
    elif unit == 'KB':
      byte *= 1024
    elif unit == 'MB':
      byte *= 1024**2
    elif unit == 'GB':
      byte *= 1024**3
    return math.trunc(byte)
function_tokens: def str_to_byte ( line ) : parts = line . split ( ' ' ) byte = float ( parts [ 0 ] ) unit = parts [ 1 ] if unit == 'B' : byte *= 1 elif unit == 'KB' : byte *= 1024 elif unit == 'MB' : byte *= 1024 ** 2 elif unit == 'GB' : byte *= 1024 ** 3 return math . trunc ( byte )