def get_suv_bw_scale_factor(ds):
    if (ds.Units == 'CNTS'):
        return float(ds[(28755, 4096)].value)
    assert (ds.Modality == 'PT')
    assert ('DECY' in ds.CorrectedImage)
    assert ('ATTN' in ds.CorrectedImage)
    assert ('START' in ds.DecayCorrection)
    assert (ds.Units == 'BQML')
    half_life = float(ds.RadiopharmaceuticalInformationSequence[0].RadionuclideHalfLife)
    if ('SeriesTime' in ds):
        series_date_time = ((ds.SeriesDate + '_') + ds.SeriesTime)
    if ('.' in series_date_time):
        series_date_time = series_date_time[:(- (len(series_date_time) - series_date_time.index('.')))]
    series_date_time = datetime.strptime(series_date_time, '%Y%m%d_%H%M%S')
    if ('SeriesTime' in ds):
        start_time = ((ds.SeriesDate + '_') + ds.RadiopharmaceuticalInformationSequence[0].RadiopharmaceuticalStartTime)
    if ('.' in start_time):
        start_time = start_time[:(- (len(start_time) - start_time.index('.')))]
    start_time = datetime.strptime(start_time, '%Y%m%d_%H%M%S')
    decay_time = (series_date_time - start_time).seconds
    injected_dose = float(ds.RadiopharmaceuticalInformationSequence[0].RadionuclideTotalDose)
    decayed_dose = (injected_dose * pow(2, ((- decay_time) / half_life)))
    patient_weight = float(ds.PatientWeight)
    suv_bw_scale_factor = ((patient_weight * 1000) / decayed_dose)
    return suv_bw_scale_factor
def get_suv_bw_scale_factor(ds):
    if (ds.Units == 'CNTS'):
        return float(ds[(28755, 4096)].value)
    assert (ds.Modality == 'PT')
    assert ('DECY' in ds.CorrectedImage)
    assert ('ATTN' in ds.CorrectedImage)
    assert ('START' in ds.DecayCorrection)
    assert (ds.Units == 'BQML')
    half_life = float(ds.RadiopharmaceuticalInformationSequence[0].RadionuclideHalfLife)
    if ('SeriesTime' in ds):
        series_date_time = ((ds.SeriesDate + '_') + ds.SeriesTime)
    if ('.' in series_date_time):
        series_date_time = series_date_time[:(- (len(series_date_time) - series_date_time.index('.')))]
    series_date_time = datetime.strptime(series_date_time, '%Y%m%d_%H%M%S')
    if ('SeriesTime' in ds):
        start_time = ((ds.SeriesDate + '_') + ds.RadiopharmaceuticalInformationSequence[0].RadiopharmaceuticalStartTime)
    if ('.' in start_time):
        start_time = start_time[:(- (len(start_time) - start_time.index('.')))]
    start_time = datetime.strptime(start_time, '%Y%m%d_%H%M%S')
    decay_time = (series_date_time - start_time).seconds
    injected_dose = float(ds.RadiopharmaceuticalInformationSequence[0].RadionuclideTotalDose)
    decayed_dose = (injected_dose * pow(2, ((- decay_time) / half_life)))
    patient_weight = float(ds.PatientWeight)
    suv_bw_scale_factor = ((patient_weight * 1000) / decayed_dose)
    return suv_bw_scale_factor