def to_size_in_mb(data_size, unit):
 if (unit == 'G'):
  return (data_size * 1024)
 elif (unit == 'B'):
  return (data_size / (1024 * 1024.0))
 else:
  return data_size

def to_size_in_mb ( data_size , unit ) : if ( unit == 'G' ) : return ( data_size * 1024 ) elif ( unit == 'B' ) : return ( data_size / ( 1024 * 1024.0 ) ) else : return data_size
convert size in given unit: gb or b to size in mb .