def _media_size_to_long(maxSize):
 if (len(maxSize) < 2):
  return 0
 units = maxSize[(-2):].upper()
 bit_shift = _MEDIA_SIZE_BIT_SHIFTS.get(units)
 if (bit_shift is not None):
  return (int(maxSize[:(-2)]) << bit_shift)
 else:
  return int(maxSize)

def _media_size_to_long ( maxSize ) : if ( len ( maxSize ) < 2 ) : return 0 units = maxSize [ ( - 2 ) : ] . upper ( ) bit_shift = _MEDIA_SIZE_BIT_SHIFTS . get ( units ) if ( bit_shift is not None ) : return ( int ( maxSize [ : ( - 2 ) ] ) << bit_shift ) else : return int ( maxSize )
convert a string media size .