def METHOD_NAME(time_in):
    time_in.strip()
    time_in.replace(" ", "")
    result = "NaN"
    if "ms" in time_in:
        result = str(assert_float(time_in.replace("ms", "")))
    elif "s" in time_in:
        result = str(assert_float(time_in.replace("s", "")) * 1000.0)
    elif "m" in time_in:
        result = str(assert_float(time_in.replace("m", "")) * 60.0 * 1000.0)
    elif "h" in time_in:
        result = str(assert_float(time_in.replace("h", "")) * 60.0 * 60.0 * 1000.0)
    return result