<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _scaled_bqm(bqm, scalar, bias_range, quadratic_range, ignored_variables, ignored_interactions, ignore_offset):
 """Helper function of sample for scaling"""


    bqm_copy = bqm.copy()
    if scalar is None:
        scalar = _calc_norm_coeff(bqm_copy.linear, bqm_copy.quadratic,
                                  bias_range, quadratic_range,
                                  ignored_variables, ignored_interactions)

    bqm_copy.scale(scalar, ignored_variables=ignored_variables,
                   ignored_interactions=ignored_interactions,
                   ignore_offset=ignore_offset)
    bqm_copy.info.update({'scalar': scalar})
    return bqm_copy