import re


def _convert_value(value, conversion_dict):
  """Converts data strings to a particular unit based on conversion_dict.

  Args:
    value: String, contains data value+unit
    conversion_dict: Dictionary containing units and their respective
      multiplication factor

  Returns:
    Int, number in a specific unit

  Ex: For args value = "5s" and conversion_dict=RAMPTIME_CONVERSION 
      "5s" will be converted to 5000 milliseconds and 5000 will be returned

  """
  num, unit = re.findall('[0-9]+|[A-Za-z]+', value)
  mult_factor = conversion_dict[unit.lower()]
  converted_num = int(num) * mult_factor
  return converted_num