def _convert_unit(size_string):
    """
    Convert given string to size in megabytes

    :param string size_string: Size with unit
    :returns integer: Converted size from given unit
    :rtype integer:
    """
    size, unit = size_string.split(' ')
    if 'M' in unit:
        return int(float(size))
    elif 'G' in unit:
        return int(float(size)) * 1024
    elif 'T' in unit:
        return int(float(size)) * 1024 * 1024